Merge pull request #40 from andymcc/rabbit_fqdn
Fix /etc/hosts issues on rabbit servers when using FQDN
This commit is contained in:
commit
e7db9f3456
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user