From f18856d0e2485aaf807271c7d9385bf564bfbb0f Mon Sep 17 00:00:00 2001 From: Trishna Guha Date: Fri, 7 Sep 2018 16:35:37 +0530 Subject: [PATCH] Add ambiguous command check as the error message is not persistent on nexus devices (#45337) Signed-off-by: Trishna Guha --- lib/ansible/module_utils/network/nxos/nxos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/network/nxos/nxos.py b/lib/ansible/module_utils/network/nxos/nxos.py index 5beee80d32..8ca12f10f1 100644 --- a/lib/ansible/module_utils/network/nxos/nxos.py +++ b/lib/ansible/module_utils/network/nxos/nxos.py @@ -161,7 +161,7 @@ class Cli: if network_api == 'cliconf' and out: for index, resp in enumerate(out): - if 'Invalid command at' in resp and 'json' in resp: + if ('Invalid command at' in resp or 'Ambiguous command at' in resp) and 'json' in resp: if commands[index]['output'] == 'json': commands[index]['output'] = 'text' out = connection.run_commands(commands, check_rc)