network/roles/fabric/templates/switch.intf.j2

13 lines
340 B
Django/Jinja

{% for iface in interfaces | iface_real | rejectattr('mgmt_only') | selectattr('enabled') %}
auto {{ iface.name }}
iface {{ iface.name }}
{% if iface.vrf %}
vrf {{ iface.vrf.name }}
{% endif %}
mtu {{ iface.mtu if iface.mtu else 9216 }}
{% for addr in iface.ip_addresses %}
address {{ addr.address }}
{% endfor %}
{% endfor %}