21 lines
483 B
Django/Jinja
21 lines
483 B
Django/Jinja
# Management VRF and link.
|
|
auto mgmt
|
|
iface mgmt
|
|
address 127.0.0.1/8
|
|
address ::1/128
|
|
vrf-table auto
|
|
|
|
{% for iface in interfaces | selectattr('name', 'match', '^mgmt') | selectattr('ip_addresses') %}
|
|
auto {{ iface.name }}
|
|
iface {{ iface.name }}
|
|
vrf mgmt
|
|
{% for ip in iface.ip_addresses %}
|
|
address {{ ip.address }}
|
|
{% endfor %}
|
|
{% if iface.custom_fields.gateway %}
|
|
gateway {{ iface.custom_fields.gateway.address | ipaddr('address') }}
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|