mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
fix nxos_switchport/l2_interface trunk_vlans state absent (#37180)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
@@ -271,7 +271,7 @@ def remove_switchport_config_commands(interface, existing, proposed, module):
|
||||
elif mode == 'trunk':
|
||||
tv_check = existing.get('trunk_vlans_list') == proposed.get('trunk_vlans_list')
|
||||
|
||||
if not tv_check:
|
||||
if tv_check:
|
||||
existing_vlans = existing.get('trunk_vlans_list')
|
||||
proposed_vlans = proposed.get('trunk_vlans_list')
|
||||
vlans_to_remove = set(proposed_vlans).intersection(existing_vlans)
|
||||
|
||||
@@ -254,7 +254,7 @@ def remove_switchport_config_commands(name, existing, proposed, module):
|
||||
elif mode == 'trunk':
|
||||
tv_check = existing.get('trunk_vlans_list') == proposed.get('trunk_vlans_list')
|
||||
|
||||
if not tv_check:
|
||||
if tv_check:
|
||||
existing_vlans = existing.get('trunk_vlans_list')
|
||||
proposed_vlans = proposed.get('trunk_vlans_list')
|
||||
vlans_to_remove = set(proposed_vlans).intersection(existing_vlans)
|
||||
|
||||
Reference in New Issue
Block a user