servers/roles/proxmox/templates/mgmt.intf.j2

21 lines
483 B
Plaintext
Raw Normal View History

# Management VRF and link.
auto mgmt
iface mgmt
address 127.0.0.1/8
address ::1/128
vrf-table auto
2023-11-20 11:56:34 +00:00
{% 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 %}
2023-11-20 11:56:34 +00:00
{% if iface.custom_fields.gateway %}
gateway {{ iface.custom_fields.gateway.address | ipaddr('address') }}
{% endif %}
{% endfor %}