xoxys.network/templates/etc/hosts.j2
Robert Kaussow 9dea3340ae
Some checks failed
continuous-integration/drone/push Build is failing
fix: apply network changes on systems using nm
2022-10-10 15:17:16 +02:00

15 lines
686 B
Django/Jinja

#jinja2: lstrip_blocks: True
{{ ansible_managed | comment }}
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
{% if network_ipv6_enabled %}
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
{% endif %}
{% if network_hostname is defined and network_fqdn is defined and network_defaultif is defined %}
{{ network_interfaces[network_defaultif].ipaddr | default(hostvars[inventory_hostname]["ansible_" + network_defaultif].ipv4.address) }} {{ network_fqdn }} {{ network_hostname }}
{% endif %}
{% if network_hosts_extra %}
{% for item in network_hosts_extra %}
{{ item.address }} {{ item.fqdn }} {{ item.hostname }}
{% endfor %}
{% endif %}