1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

nxos_system idempotence fix (#44752)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
Trishna Guha 2018-08-28 12:05:19 +05:30 committed by GitHub
parent 289be02224
commit 8a79d944a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -279,10 +279,8 @@ def parse_name_servers(config, vrf_config, vrfs):
objects = list() objects = list()
match = re.search('^ip name-server (.+)$', config, re.M) 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(' '): for addr in match.group(1).split(' '):
if addr == 'use-vrf' or addr in vrfs:
continue
objects.append({'server': addr, 'vrf': None}) objects.append({'server': addr, 'vrf': None})
for vrf, cfg in iteritems(vrf_config): for vrf, cfg in iteritems(vrf_config):