diff --git a/tasks/exchanges.yml b/tasks/exchanges.yml index 9f262ad..f097935 100644 --- a/tasks/exchanges.yml +++ b/tasks/exchanges.yml @@ -4,7 +4,7 @@ name: python-pip update_cache: yes force: yes - state: installed + state: present # Exchanges require this library to be installed - name: Install requests library diff --git a/tasks/install.yml b/tasks/install.yml index 3ec7884..8ce3787 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -25,6 +25,13 @@ dest: /etc/yum.repos.d/rabbitmq.repo when: ansible_pkg_mgr == "yum" +- name: Ensure hostname is present in /etc/hosts + lineinfile: + path: /etc/hosts + regexp: "^127.0.1.1" + line: "127.0.1.1 {{ inventory_hostname }}" + state: present + - name: Install rabbitmq package: name: rabbitmq-server