diff --git a/templates/etc/hostname.j2 b/templates/etc/hostname.j2 index 45950b7..1f6315b 100644 --- a/templates/etc/hostname.j2 +++ b/templates/etc/hostname.j2 @@ -1,3 +1,3 @@ -{% if network.hostname is defined %} -{{ network.hostname }} +{% if network_hostname is defined %} +{{ network_hostname }} {% endif %} diff --git a/templates/etc/hosts.j2 b/templates/etc/hosts.j2 index 903a1f0..602a2bb 100644 --- a/templates/etc/hosts.j2 +++ b/templates/etc/hosts.j2 @@ -1,9 +1,9 @@ #jinja2: trim_blocks: True, lstrip_blocks: True # {{ ansible_managed }} 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 -{% if network.disable_ipv6 == false %} +{% if network_disable_ipv6 == false %} ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 {% endif %} -{% if network.hostname is defined and network.fqdn is defined and network.config[network.defaultif].ipaddr is defined %} -{{ network.config[network.defaultif].ipaddr }} {{ network.fqdn }} {{ network.hostname }} +{% if network_hostname is defined and network_fqdn is defined and network_config[network_defaultif]_ipaddr is defined %} +{{ network_config[network_defaultif]_ipaddr }} {{ network_fqdn }} {{ network_hostname }} {% endif %}