forked from zentralwerk/network
more switching shit
This commit is contained in:
parent
4522b8612e
commit
d0f108745e
|
@ -124,6 +124,8 @@ switches:
|
|||
- GigabitEthernet1/0/38
|
||||
- GigabitEthernet1/0/39
|
||||
- GigabitEthernet1/0/40
|
||||
- GigabitEthernet1/0/41
|
||||
- GigabitEthernet1/0/42
|
||||
vlans:
|
||||
- mgmt
|
||||
- pub
|
||||
|
@ -153,12 +155,13 @@ switches:
|
|||
- priv14
|
||||
- priv15
|
||||
- priv16
|
||||
up1:
|
||||
mode: access
|
||||
ports:
|
||||
- GigabitEthernet 1/0/43
|
||||
priv1:
|
||||
mode: access
|
||||
ports:
|
||||
- GigabitEthernet 1/0/41
|
||||
- GigabitEthernet 1/0/42
|
||||
- GigabitEthernet 1/0/43
|
||||
- GigabitEthernet 1/0/44
|
||||
priv2:
|
||||
mode: access
|
||||
|
|
|
@ -56,6 +56,9 @@ expect "{{ hostname }}]"
|
|||
{%- set group = 0 %}
|
||||
{%- for name, conf in switch['ports'].items() %}
|
||||
{%- if conf['mode'] == 'trunk' or conf['mode'] == 'bond' %}
|
||||
{%- if conf['mode'] == 'bond' %}
|
||||
{%- set group = group + 1 %}
|
||||
{%- endif %}
|
||||
{%- for port in conf['ports'] %}
|
||||
send "interface {{ port }}\r"
|
||||
expect "]"
|
||||
|
@ -66,7 +69,6 @@ send "undo lacp enable\r"
|
|||
{%- endif %}
|
||||
expect "]"
|
||||
{%- if conf['mode'] == 'bond' %}
|
||||
{%- set group = group + 1 %}
|
||||
send "port link-aggregation group {{ group }}\r"
|
||||
{%- else %}
|
||||
send "undo port link-aggregation group\r"
|
||||
|
|
Loading…
Reference in New Issue