proxmox: get all data from netbox
This commit is contained in:
parent
62a3dc5121
commit
2d89cd730c
3 changed files with 17 additions and 20 deletions
|
@ -1,19 +1,20 @@
|
|||
# Keep vmbr0 named as is and in the main interfaces file so Proxmox can find it.
|
||||
{# Keep vmbr0 named as is and in the main interfaces file so Proxmox can find it. #}
|
||||
{% set bridge = interfaces | selectattr('type') | selectattr('type.value', '==', 'bridge') | first %}
|
||||
{% set my_vlan_ids = bridge.tagged_vlans | default([]) | map(attribute='vid') | sort -%}
|
||||
|
||||
# Bridge for V(X)LANs.
|
||||
auto vmbr0
|
||||
iface vmbr0 inet manual
|
||||
auto {{ bridge.name }}
|
||||
iface {{ bridge.name }} inet manual
|
||||
bridge-vlan-aware yes
|
||||
bridge-ports regex (vni.*)
|
||||
bridge-stp off
|
||||
bridge-fd 0
|
||||
|
||||
# Interfaces.
|
||||
{% for vlan in vlans %}
|
||||
auto vni{{ vlan }}
|
||||
iface vni{{ vlan }} inet static
|
||||
vxlan-id {{ vlan }}
|
||||
bridge-access {{ vlan }}
|
||||
{% for vid in my_vlan_ids %}
|
||||
auto vni{{ vid }}
|
||||
iface vni{{ vid }} inet static
|
||||
vxlan-id {{ vid }}
|
||||
bridge-access {{ vid }}
|
||||
mstpctl-bpduguard yes
|
||||
mstpctl-portbpdufilter yes
|
||||
|
||||
|
@ -23,8 +24,7 @@ iface vni{{ vlan }} inet static
|
|||
# Might start working after proxmox upgrades their ifupdown2.
|
||||
#auto vxlan
|
||||
#iface vxlan inet static
|
||||
# bridge-vlan-vni-map {{ vlans | zip(vlans) | map('join', '=') | join(' ') }}
|
||||
# bridge-vids {{ vlans | join(' ') }}
|
||||
# bridge-vlan-vni-map {{ my_vlan_ids | zip(my_vlan_ids) | map('join', '=') | join(' ') }}
|
||||
# bridge-learning off
|
||||
|
||||
source /etc/network/interfaces.d/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue