Timotej Lazar
a637da5c21
Oops. Not sure why stuff apparently worked without it. Especially switchd on exits which worked itself into a bit of a frenzy.
28 lines
792 B
Django/Jinja
28 lines
792 B
Django/Jinja
# Management VRF.
|
|
auto mgmt
|
|
iface mgmt
|
|
address 127.0.0.1/8
|
|
address ::1/128
|
|
vrf-table auto
|
|
|
|
{% for iface in interfaces | rejectattr('mgmt_only') %}
|
|
auto {{ iface.name }}
|
|
iface {{ iface.name }} inet {% if iface.name == 'lo' %}loopback{% else %}static{% endif +%}
|
|
{% if iface.mtu %}
|
|
mtu {{ iface.mtu }}
|
|
{% endif %}
|
|
{% if iface.vrf %}
|
|
vrf {{ iface.vrf.name }}
|
|
{% endif %}
|
|
{% for ip in iface.ip_addresses %}
|
|
address {{ ip.address }}
|
|
{% endfor %}
|
|
{% if iface.custom_fields.gateway %}
|
|
gateway {{ iface.custom_fields.gateway.address | ipaddr('address') }}
|
|
{% endif %}
|
|
{% if iface.name == 'lo' %}
|
|
vxlan-local-tunnelip {{ iface.ip_addresses | selectattr('family.value', '==', 4) | map(attribute='address') | sort | first | ipaddr('address') }}
|
|
{% endif %}
|
|
|
|
{% endfor %}
|