7 lines
379 B
Django/Jinja
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 }}
|