Include hostnames in /etc/hosts
Include the resolution of the hostname to the private IPv4 for all hosts in multinode setups. Currently we only setup the inventory name, which is not enough since qemu relies on the hostname for live migration. Change-Id: I717f5f8b5b803abe874bea498fd07f5508cc7214
This commit is contained in:
parent
b457191d14
commit
13b96b4bc6
@ -4,6 +4,7 @@
|
||||
{% set hosts = {} -%}
|
||||
{% for host, vars in hostvars.items() -%}
|
||||
{% set _ = hosts.update({host: vars['nodepool']['private_ipv4']}) -%}
|
||||
{% set _ = hosts.update({vars['ansible_hostname']: vars['nodepool']['private_ipv4']}) -%}
|
||||
{% endfor -%}
|
||||
{{- hosts -}}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user