2018-12-01 03:06:08 +00:00
|
|
|
#jinja2: lstrip_blocks: True
|
2019-08-27 20:24:09 +00:00
|
|
|
{{ ansible_managed | comment }}
|
2022-10-10 13:17:16 +00:00
|
|
|
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
|
2022-09-13 19:47:28 +00:00
|
|
|
{% if network_ipv6_enabled %}
|
2022-10-28 10:36:52 +00:00
|
|
|
::1 localhost6 localhost6.localdomain6
|
2017-05-18 21:10:07 +00:00
|
|
|
{% endif %}
|
2024-08-21 18:54:49 +00:00
|
|
|
{% if network_hostname is defined and network_fqdn is defined %}
|
|
|
|
{{ network_interfaces.0.ipaddr | default(ansible_default_ipv4.address) }} {{ network_fqdn }} {{ network_hostname }}
|
|
|
|
{% if network_ipv6_enabled %}
|
|
|
|
{{ network_interfaces.0.ipv6addr | default(ansible_default_ipv6.address) }} {{ network_fqdn }} {{ network_hostname }}
|
|
|
|
{% endif %}
|
2017-05-18 21:10:07 +00:00
|
|
|
{% endif %}
|
2022-09-18 11:02:53 +00:00
|
|
|
{% if network_hosts_extra %}
|
|
|
|
{% for item in network_hosts_extra %}
|
2018-12-01 03:06:08 +00:00
|
|
|
{{ item.address }} {{ item.fqdn }} {{ item.hostname }}
|
|
|
|
{% endfor %}
|
2018-12-07 22:04:58 +00:00
|
|
|
{% endif %}
|