diff options
| author | 2022-01-11 03:03:49 +0000 | |
|---|---|---|
| committer | 2022-01-11 03:09:33 +0000 | |
| commit | b2c93d44412a16825cec21d806e38f5e48246f3f (patch) | |
| tree | 9de5ccdf8e76b86274ad74511a2653c56b64a5f9 | |
| parent | Use FQDNs for Ansible inventory (diff) | |
Resolve inventory hostnames with dnspython when injecting to /etc/hosts
| -rw-r--r-- | roles/common/templates/etc-hosts.j2 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/roles/common/templates/etc-hosts.j2 b/roles/common/templates/etc-hosts.j2 index 141f3d1..6fdbdaa 100644 --- a/roles/common/templates/etc-hosts.j2 +++ b/roles/common/templates/etc-hosts.j2 @@ -4,4 +4,4 @@ ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters -{{ ansible_host }} {{ inventory_hostname }}.box.pydis.wtf {{ inventory_hostname }} +{{ lookup('dig', ansible_host) }} {{ inventory_hostname }}.box.pydis.wtf {{ inventory_hostname }} |