{% set my_cluster = query('netbox.netbox.nb_lookup', 'clusters', raw_data=true, api_filter='name='~cluster) | first -%} # bridges must be named vmbrN for proxmox to care {% for vlan in my_cluster.custom_fields.vlans | default([], true) | sort(attribute='vid') %} auto vmbr{{ vlan.vid }} iface vmbr{{ vlan.vid }} # {{ vlan.name }} bridge-vlan-aware no bridge-ports vni{{ vlan.vid }} bridge-stp off bridge-fd 0 auto vni{{ vlan.vid }} iface vni{{ vlan.vid }} vxlan-id {{ vlan.vid }} mstpctl-bpduguard yes mstpctl-portbpdufilter yes {% endfor %} source /etc/network/interfaces.d/*