From bb71e83d2360798d88c0adf62ed196548d6f44a1 Mon Sep 17 00:00:00 2001 From: Sam Al-Sapti Date: Tue, 7 Nov 2023 21:32:11 +0100 Subject: [PATCH] Set in hosts --- roles/common/templates/etc/hosts.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/common/templates/etc/hosts.j2 b/roles/common/templates/etc/hosts.j2 index 6cd5b0e..4ccb670 100644 --- a/roles/common/templates/etc/hosts.j2 +++ b/roles/common/templates/etc/hosts.j2 @@ -1,6 +1,6 @@ # code: language=ansible-jinja 127.0.0.1 localhost -127.0.1.1 {{ hostname }} +{{ ansible_host }} {{ fqdn }} # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback