fix dci failure nxos (#32877) (#32878)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit ceefeeb279)
This commit is contained in:
Trishna Guha 2017-11-14 07:21:47 +00:00 committed by GitHub
parent 0a43449391
commit f179adcf2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -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)
<a id="2.4.1"></a>

View file

@ -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)