Only configure relevant VLANs on any switch
parent
4bdd303dff
commit
e38c09bc09
|
|
@ -302,7 +302,8 @@ routing-options {
|
|||
|
||||
{% macro vlanssection(vlans,device) %}
|
||||
vlans {
|
||||
{% for vlan in vlans %}
|
||||
{# This next line selects all of the VLANs which are configured on this device #}
|
||||
{% for vlan in vlans if (device['interfaces']|selectattr('untagged_vlan.vid','equalto',vlan)|list|count or interfaces|map(attribute='tagged_vlans')|sum(start=[])|selectattr('vid','equalto',vlan)|list|count) or device['interfaces']|selectattr('name', 'equalto', 'irb.'+vlan['vid']|string)|list|count %}
|
||||
vl{{ vlan['vid'] }} {
|
||||
{% if vlan['name'] != '' %}
|
||||
description "{{ vlan['name'] }}";
|
||||
|
|
|
|||
Loading…
Reference in New Issue