From ceefeeb27960e8a6c03c02b8d875de2b78f088d7 Mon Sep 17 00:00:00 2001 From: Trishna Guha Date: Tue, 14 Nov 2017 07:17:21 +0000 Subject: [PATCH] fix dci failure nxos (#32877) Signed-off-by: Trishna Guha --- lib/ansible/module_utils/nxos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)