HP-procurve-2824: make link-aggregation groups static

This commit is contained in:
Astro 2020-11-27 20:11:38 +01:00
parent ccefecff86
commit 95c36fbbe6
2 changed files with 4 additions and 4 deletions

View File

@ -503,6 +503,7 @@ switches:
ports:
switch-b1:
mode: bond
group: 2
ports: 21-24
vlans:
- mgmt
@ -590,6 +591,7 @@ switches:
# Saal A Buehne
switch-a1:
mode: bond
group: 1
ports: 15-16
vlans:
- mgmt

View File

@ -70,18 +70,16 @@ expect "(config)# "
{%- endfor %}
{%- set group = 0 %}
{%- for name, conf in switch['ports'].items() %}
{%- if conf['mode'] == 'bond' %}
{%- set group = group + 1 %}
send "interface {{ conf['ports'] }} lacp active\r"
expect "(config)# "
send "trunk {{ conf['ports'] }} trk{{ group }} lacp\r"
send "trunk {{ conf['ports'] }} trk{{ conf['group'] }} lacp\r"
expect "(config)# "
{%- for vlan_name in conf['vlans'] %}
send "vlan {{ pillar['vlans'][vlan_name] }} tagged trk{{ group }}\r"
send "vlan {{ pillar['vlans'][vlan_name] }} tagged trk{{ conf['group'] }}\r"
expect "(config)# "
{%- endfor %}