diff --git a/lib/ansible/module_utils/nxos.py b/lib/ansible/module_utils/nxos.py index 2c0db76757..52974d03b4 100644 --- a/lib/ansible/module_utils/nxos.py +++ b/lib/ansible/module_utils/nxos.py @@ -375,11 +375,9 @@ def to_command(module, commands): commands = transform(to_list(commands)) - for index, item in enumerate(commands): + for item in commands: if is_json(item['command']): item['output'] = 'json' - elif is_text(item['command']): - item['output'] = 'text' return commands