2024-02-20 15:40:13 +00:00
|
|
|
{% set my_cluster = query('netbox.netbox.nb_lookup', 'clusters', raw_data=true,
|
|
|
|
api_filter='name='~cluster) | first -%}
|
2023-10-18 13:01:02 +00:00
|
|
|
|
2024-02-20 15:40:13 +00:00
|
|
|
# bridges must be named vmbrN for proxmox to care
|
2024-02-26 13:30:17 +00:00
|
|
|
{% for vlan in my_cluster.custom_fields.vlans | default([], true) | sort(attribute='vid') %}
|
2024-02-20 15:40:13 +00:00
|
|
|
auto vmbr{{ vlan.vid }}
|
|
|
|
iface vmbr{{ vlan.vid }} inet manual
|
|
|
|
# {{ vlan.name }}
|
|
|
|
bridge-vlan-aware no
|
|
|
|
bridge-ports vni{{ vlan.vid }}
|
2023-10-18 13:01:02 +00:00
|
|
|
bridge-stp off
|
|
|
|
bridge-fd 0
|
|
|
|
|
2024-02-20 15:40:13 +00:00
|
|
|
auto vni{{ vlan.vid }}
|
|
|
|
iface vni{{ vlan.vid }} inet static
|
|
|
|
vxlan-id {{ vlan.vid }}
|
2023-10-18 13:01:02 +00:00
|
|
|
mstpctl-bpduguard yes
|
|
|
|
mstpctl-portbpdufilter yes
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
source /etc/network/interfaces.d/*
|