diff --git a/lib/ansible/module_utils/nxos.py b/lib/ansible/module_utils/nxos.py index 471f3226d7..36b8a3306e 100644 --- a/lib/ansible/module_utils/nxos.py +++ b/lib/ansible/module_utils/nxos.py @@ -169,7 +169,7 @@ class Cli: except ValueError: out = to_text(out).strip() - if item['output'] == 'json' and isinstance(out, string_types): + if item['output'] == 'json' and out != 'ok' and isinstance(out, string_types): self._module.fail_json(msg='failed to retrieve output of %s in json format' % item['command']) responses.append(out)