servers/roles/proxmox/templates/loopback.intf.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

7 lines
379 B
Django/Jinja

{% set lo = hostvars[inventory_hostname].interfaces | selectattr('name', '==', 'lo') | first %}
{% set vxlan_ip = lo.ip_addresses | selectattr('family.value', '==', 4)
| map(attribute='address') | first
| ansible.utils.ipaddr('address') %}
iface lo
# without this the local tunnel IP is sometimes advertised as 0.0.0.0 on boot
vxlan-local-tunnelip {{ vxlan_ip }}