servers/roles/debian/templates/loopback.intf.j2
Timotej Lazar 63ab087645 debian: get inventory data from netbox
Set standardized interface names (mgmt0… for L2 management interfaces
and lan0… for L3 data interfaces speaking BGP). ASN is stored as a
custom field in netbox but that might change.
2023-07-20 13:24:51 +02:00

7 lines
218 B
Django/Jinja

{% set iface_lo = hostvars[inventory_hostname].interfaces | selectattr('name', 'equalto', 'lo') | first %}
auto lo
iface lo inet loopback
{% for ip in iface_lo.ip_addresses %}
address {{ ip.address }}
{% endfor %}