Remove affecting rabbitmq hosts record
Record for 127.0.1.1 is added by some distributions which makes clustering fail, as Erlang port is binded to mgmt IP, while rabbit expects to access it through $hostname, which would lead to 127.0.1.1. At same time it's possbile to explicitly bind distribution port only to single address. So we need to ensure that hostname resolvs to mgmt IP and drop record for 127.0.1.1 Closes-Bug: #1960587 Change-Id: I907d4714319ac7134ede0dc62b51c1964b9befc5
This commit is contained in:
parent
c8ce051651
commit
e6b3ddbc1e
@ -49,6 +49,11 @@
|
||||
state: present
|
||||
line: '127.0.0.1 localhost'
|
||||
regexp: '^127\.0\.0\.1'
|
||||
- name: Remove hostname record for 127.0.1.1
|
||||
replace:
|
||||
path: /etc/hosts
|
||||
regexp: '^(127\.0\.1\.1)\s*(\S*)\s*({{ ansible_facts["hostname"] }})($|\s.*)'
|
||||
replace: '\1 \2 \4'
|
||||
when:
|
||||
- rabbitmq_manage_hosts_entries | bool
|
||||
tags:
|
||||
|
Loading…
Reference in New Issue
Block a user