diff options
author | Trishna Guha <trishnaguha17@gmail.com> | 2018-01-10 10:50:40 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-10 10:50:40 +0530 |
commit | 85a181e715cec46cf0062f598648f77728f9f9cc (patch) | |
tree | 250943ee19510fd94dadc238f0b3a5f47276e4ee | |
parent | 02b1d90cf3fc47bba8a1ec810bca6da528c63c0b (diff) | |
download | ansible-85a181e715cec46cf0062f598648f77728f9f9cc.tar.gz |
fix nxos_bgp failure for graceful_restart warning (#34630)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
-rw-r--r-- | lib/ansible/module_utils/nxos.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/ansible/module_utils/nxos.py b/lib/ansible/module_utils/nxos.py index 9af555e054..289257f388 100644 --- a/lib/ansible/module_utils/nxos.py +++ b/lib/ansible/module_utils/nxos.py @@ -176,7 +176,13 @@ class Cli: msgs = [] for cmd in config: rc, out, err = self.exec_command(cmd) - if rc != 0: + if rc != 0 and 'no graceful-restart' in err: + if 'ISSU/HA will be affected if Graceful Restart is disabled' in err: + out = '' + msgs.append(out) + else: + self._module.fail_json(msg=to_text(err, errors='surrogate_then_replace')) + elif rc != 0: self._module.fail_json(msg=to_text(err, errors='surrogate_then_replace')) elif out: msgs.append(out) |