From 9bb513e6954cf303941cc1edfe47377da6fb2e30 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 1 Sep 2023 15:42:19 -0400 Subject: [PATCH] Add hostsnames properly --- roles/base/templates/etc/hosts.j2 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/roles/base/templates/etc/hosts.j2 b/roles/base/templates/etc/hosts.j2 index 8bc1830..e19c1ff 100644 --- a/roles/base/templates/etc/hosts.j2 +++ b/roles/base/templates/etc/hosts.j2 @@ -1,6 +1,12 @@ # Local system hosts file # {{ ansible_managed }} -::1 localhost ip6-localhost ip6-loopback +127.0.0.1 localhost +::1 ip6-localhost ip6-loopback ff02::1 ip6-allmodes ff02::2 ip6-allrouters + +{% for node in pvc_nodes %} +{{ node.cluster_ip }} {{ node.hostname }}.{{ pvc_cluster_domain }} {{ node.hostname }} +{{ node.storage_ip }} {{ node.hostname }}.{{ pvc_storage_domain }} +{% endfor %}