Merge "Use more permissive regex to remove the offending 127.0.1.1"
This commit is contained in:
commit
eb0a0ff8d7
@ -8,14 +8,16 @@
|
||||
become: True
|
||||
when: customize_etc_hosts | bool
|
||||
|
||||
# NOTE(mgoddard): Ubuntu includes a line in /etc/hosts that makes the local
|
||||
# hostname and nodename (if different) point to 127.0.1.1. This can break
|
||||
# NOTE(mgoddard): Ubuntu may include a line in /etc/hosts that makes the local
|
||||
# hostname and fqdn point to 127.0.1.1. This can break
|
||||
# RabbitMQ, which expects the hostname to resolve to the API network address.
|
||||
# Remove these troublesome entries.
|
||||
- name: Ensure hostname does not point to loopback in /etc/hosts
|
||||
# Remove the troublesome entry.
|
||||
# see https://bugs.launchpad.net/kolla-ansible/+bug/1837699
|
||||
# and https://bugs.launchpad.net/kolla-ansible/+bug/1862739
|
||||
- name: Ensure hostname does not point to 127.0.1.1 in /etc/hosts
|
||||
lineinfile:
|
||||
dest: /etc/hosts
|
||||
regexp: "^127.\\d+.\\d+.\\d+(\\s+{{ ansible_nodename }})?\\s+{{ ansible_hostname }}$"
|
||||
regexp: "^127.0.1.1\\b.*\\s{{ ansible_hostname }}\\b"
|
||||
state: absent
|
||||
become: True
|
||||
when: customize_etc_hosts | bool
|
||||
|
7
releasenotes/notes/bug-1862739-05246e7599375800.yaml
Normal file
7
releasenotes/notes/bug-1862739-05246e7599375800.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Use more permissive regex to remove the offending 127.0.1.1 line
|
||||
from /etc/hosts.
|
||||
`LP#1862739
|
||||
<https://bugs.launchpad.net/kolla-ansible/+bug/1862739>`__
|
Loading…
Reference in New Issue
Block a user