semaphore/roles/linux/templates/hosts.j2
2024-08-12 01:22:12 +08:00

11 lines
417 B
Django/Jinja

# File managed by Netbox / AWX
127.0.0.1 localhost.localdomain localhost
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
{% for myip in results['json']['results'] if myip.dns_name != "" %}
{{ myip.address | ansible.utils.ipaddr('address') }} {{ myip.dns_name }} {{ myip.dns_name | split('.') | first }}
{% endfor %}