Merge "Add ansible_nodename (system hostname) to /etc/hosts"
This commit is contained in:
commit
796980aa3f
@ -24,7 +24,8 @@
|
||||
{% for host in groups['baremetal'] %}
|
||||
{% set api_interface = hostvars[host]['api_interface'] %}
|
||||
{% if host not in groups['bifrost'] or 'ansible_' + api_interface in hostvars[host] %}
|
||||
{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }} {{ hostvars[host]['ansible_hostname'] }}
|
||||
{% set hostnames = [hostvars[host]['ansible_nodename'], hostvars[host]['ansible_hostname']] %}
|
||||
{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }} {{ hostnames | unique | join(' ') }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
become: True
|
||||
|
@ -0,0 +1,7 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Adds system hostnames to ``/etc/hosts``, if different from short hostnames.
|
||||
This can fix live migration of Nova instances in some contexts. See `bug
|
||||
1830023 <https://bugs.launchpad.net/kolla-ansible/+bug/1830023>`__ for
|
||||
details.
|
Loading…
x
Reference in New Issue
Block a user