diff --git a/lib/ansible/modules/network/eos/eos_config.py b/lib/ansible/modules/network/eos/eos_config.py index 1b4ae4e1366..8b51c37f550 100644 --- a/lib/ansible/modules/network/eos/eos_config.py +++ b/lib/ansible/modules/network/eos/eos_config.py @@ -165,15 +165,12 @@ def build_candidate(lines, parents, config, strategy): candidate = list() if strategy == 'strict': - if len(lines) != len(config): - candidate = list(lines) - else: - for index, cmd in enumerate(lines): - try: - if cmd != config[index]: - candidate.append(cmd) - except IndexError: + for index, cmd in enumerate(lines): + try: + if cmd != config[index]: candidate.append(cmd) + except IndexError: + candidate.append(cmd) elif strategy == 'exact': if len(lines) != len(config):