mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 22:33:25 +00:00
bugfix for handling match=strict in nxos_config
Resolves an issue where match=strict would act like match=exact when evaluating the configuration
This commit is contained in:
committed by
Matt Clay
parent
90650256ef
commit
b0a9308e0d
@@ -168,15 +168,12 @@ def build_candidate(lines, parents, config, strategy):
|
|||||||
candidate = list()
|
candidate = list()
|
||||||
|
|
||||||
if strategy == 'strict':
|
if strategy == 'strict':
|
||||||
if len(lines) != len(config):
|
for index, cmd in enumerate(lines):
|
||||||
candidate = list(lines)
|
try:
|
||||||
else:
|
if cmd != config[index]:
|
||||||
for index, cmd in enumerate(lines):
|
|
||||||
try:
|
|
||||||
if cmd != config[index]:
|
|
||||||
candidate.append(cmd)
|
|
||||||
except IndexError:
|
|
||||||
candidate.append(cmd)
|
candidate.append(cmd)
|
||||||
|
except IndexError:
|
||||||
|
candidate.append(cmd)
|
||||||
|
|
||||||
elif strategy == 'exact':
|
elif strategy == 'exact':
|
||||||
if len(lines) != len(config):
|
if len(lines) != len(config):
|
||||||
|
|||||||
Reference in New Issue
Block a user