From 7cf9ee30a5c774e58b195faa4c5829b64272f37d Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 5 Jan 2017 16:03:46 -0600 Subject: [PATCH] Removed 'no vn-segment' when state == 'absent' (#19952) --- lib/ansible/modules/network/nxos/nxos_vlan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/network/nxos/nxos_vlan.py b/lib/ansible/modules/network/nxos/nxos_vlan.py index 2e13c9a336..f0413dd025 100644 --- a/lib/ansible/modules/network/nxos/nxos_vlan.py +++ b/lib/ansible/modules/network/nxos/nxos_vlan.py @@ -628,7 +628,7 @@ def main(): end_state_vlans_list = existing_vlans_list if commands: - if existing.get('mapped_vni'): + if existing.get('mapped_vni') and state != 'absent': if (existing.get('mapped_vni') != proposed.get('mapped_vni') and existing.get('mapped_vni') != '0' and proposed.get('mapped_vni') != 'default'): commands.insert(1, 'no vn-segment')