From 8a79d944a3028f5a7da71ed3269451e5ca274c73 Mon Sep 17 00:00:00 2001 From: Trishna Guha Date: Tue, 28 Aug 2018 12:05:19 +0530 Subject: [PATCH] nxos_system idempotence fix (#44752) Signed-off-by: Trishna Guha --- lib/ansible/modules/network/nxos/nxos_system.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/ansible/modules/network/nxos/nxos_system.py b/lib/ansible/modules/network/nxos/nxos_system.py index c55b87b7c5b..044b235a565 100644 --- a/lib/ansible/modules/network/nxos/nxos_system.py +++ b/lib/ansible/modules/network/nxos/nxos_system.py @@ -279,10 +279,8 @@ def parse_name_servers(config, vrf_config, vrfs): objects = list() match = re.search('^ip name-server (.+)$', config, re.M) - if match: + if match and 'use-vrf' not in match.group(1): for addr in match.group(1).split(' '): - if addr == 'use-vrf' or addr in vrfs: - continue objects.append({'server': addr, 'vrf': None}) for vrf, cfg in iteritems(vrf_config):