diff --git a/CHANGELOG.md b/CHANGELOG.md index cc15594b80..1ebbc28bc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -163,6 +163,8 @@ Ansible Changes By Release (https://github.com/ansible/ansible/pull/32773) * nxos_config and nxos_facts - fixes for N35 platform (https://github.com/ansible/ansible/pull/32762) +* fix dci failure nxos + (https://github.com/ansible/ansible/pull/32877) diff --git a/lib/ansible/module_utils/nxos.py b/lib/ansible/module_utils/nxos.py index 5c58fd26d4..e8a1676a15 100644 --- a/lib/ansible/module_utils/nxos.py +++ b/lib/ansible/module_utils/nxos.py @@ -162,7 +162,7 @@ class Cli: except ValueError: out = to_text(out, errors='surrogate_then_replace').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)