Merge pull request #40 from andymcc/rabbit_fqdn

Fix /etc/hosts issues on rabbit servers when using FQDN
This commit is contained in:
Darren Birkett 2014-09-03 12:29:36 +01:00
commit e7db9f3456

View File

@ -31,6 +31,16 @@
- package_install
- rabbit_install
- name: Fix /etc/hosts
lineinfile:
dest: /etc/hosts
state: present
line: "{{ hostvars[item]['container_address'] }} {{ hostvars[item]['container_name'] }} {{ hostvars[item]['container_name'].split('.')[0] }}"
with_items: groups['rabbit']
tags:
- hosts
- rabbit_config
- name: Install rabbit packages
apt:
pkg: "{{ item }}"
@ -43,16 +53,6 @@
- package_install
- rabbit_install
- name: Fix /etc/hosts
lineinfile:
dest: /etc/hosts
state: present
line: "{{ hostvars[item]['container_address'] }} {{ hostvars[item]['container_name'] }} {{ hostvars[item]['container_name'].split('.')[0] }}"
with_items: groups['rabbit']
tags:
- hosts
- rabbit_config
- include: restart_rabbit.yml
- name: Read rabbit cookie