servers/roles/proxmox-backup/templates/hosts.j2
Miha Frangež e93cdfd1dd Fix ipaddr call for new ansible
The ipaddr filter was moved to ansible.utils sometime after 2.18.
2026-01-12 21:43:08 +01:00

12 lines
411 B
Django/Jinja

127.0.0.1 localhost.localdomain localhost
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
{% for address in interfaces | selectattr('name', '==', 'lo') | map(attribute='ip_addresses') | first %}
{{ address.address | ansible.utils.ipaddr('address') }} {{ address.dns_name }} {{ inventory_hostname }}
{% endfor %}