mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
fix nxos_vlan mode idempotence bug (#55144)
* fix nxos_vlan mode idempotence bug Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * Fix CI failure Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
@@ -16,13 +16,20 @@
|
||||
when: platform is search('N5K|N7K')
|
||||
|
||||
- name: "Enable feature vn segment"
|
||||
nxos_config:
|
||||
nxos_config:
|
||||
commands:
|
||||
- feature vn-segment-vlan-based
|
||||
match: none
|
||||
provider: "{{ connection }}"
|
||||
when: platform is search('N9K')
|
||||
|
||||
- name: vlan teardown
|
||||
nxos_vlan: &vlan_teardown
|
||||
vlan_range: "2-200"
|
||||
provider: "{{ connection }}"
|
||||
state: absent
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Ensure a range of VLANs are present on the switch
|
||||
nxos_vlan: &conf_vlan
|
||||
vlan_range: "2-10,20,50,55-60,100-150"
|
||||
@@ -219,15 +226,12 @@
|
||||
nxos_vlan: *remint
|
||||
ignore_errors: yes
|
||||
|
||||
- name: remove vlans
|
||||
nxos_vlan:
|
||||
vlan_range: "2-10,20,50,55-60,100-150"
|
||||
provider: "{{ connection }}"
|
||||
state: absent
|
||||
- name: vlan teardown final
|
||||
nxos_vlan: *vlan_teardown
|
||||
ignore_errors: yes
|
||||
|
||||
- name: "Disable feature vn segement"
|
||||
nxos_feature:
|
||||
nxos_feature:
|
||||
feature: vn-segment-vlan-based
|
||||
provider: "{{ connection }}"
|
||||
state: disabled
|
||||
|
||||
Reference in New Issue
Block a user