diff --git a/defaults/main.yml b/defaults/main.yml index 8ab6519..5ac9e6f 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -2,7 +2,7 @@ network_hostname: localhost network_fqdn: localdomain network_defaultif: eth0 -network_disable_ipv6: False +network_ipv6_enabled: True network_dns_server: 8.8.8.8 network_interfaces: {} diff --git a/templates/etc/hosts.j2 b/templates/etc/hosts.j2 index d697371..9da906f 100644 --- a/templates/etc/hosts.j2 +++ b/templates/etc/hosts.j2 @@ -1,7 +1,7 @@ #jinja2: lstrip_blocks: True {{ ansible_managed | comment }} 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 -{% if not network_disable_ipv6 %} +{% if network_ipv6_enabled %} ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 {% endif %} {% if network_hostname is defined and network_fqdn is defined and network_interfaces[network_defaultif].ipaddr is defined %}