switches: try to improve the lacp deconfiguration situation
This commit is contained in:
parent
d80943b491
commit
4c15782650
|
@ -68,8 +68,6 @@ send "lacp enable\r"
|
|||
send "undo lacp enable\r"
|
||||
{%- endif %}
|
||||
expect "]"
|
||||
send "undo port link-aggregation group\r"
|
||||
expect "]"
|
||||
send "port link-aggregation group {{ group }}\r"
|
||||
expect "]"
|
||||
send "port link-type trunk\r"
|
||||
|
@ -89,6 +87,8 @@ expect "{{ hostname }}]"
|
|||
{%- for port in conf['ports'] %}
|
||||
send "interface {{ port }}\r"
|
||||
expect "]"
|
||||
send "undo port link-aggregation group\r"
|
||||
expect "]"
|
||||
send "port link-type access\r"
|
||||
expect "]"
|
||||
send "port access vlan {{ pillar['vlans'][name] }}\r"
|
||||
|
|
|
@ -75,6 +75,10 @@ expect "(config)# "
|
|||
{%- endfor %}
|
||||
|
||||
{%- elif conf['mode'] == 'access' %}
|
||||
|
||||
send "no trunk {{ conf['ports'] }}\r"
|
||||
expect "(config)# "
|
||||
|
||||
send "vlan {{ pillar['vlans'][name] }} untagged {{ conf['ports'] }}\r"
|
||||
expect "(config)# "
|
||||
|
||||
|
|
Loading…
Reference in New Issue