Backport/2.8/60071 ce_config : It is necessary to undo mmi-mode enable after running commands. (#60071) (#60085)

* It is necessary to undo mmi-mode enable after running commands. (#60071)


(cherry picked from commit 13c8f7b00c)

* add a changelog fragment.
This commit is contained in:
Xu Yuandong 2019-08-08 12:57:55 +08:00 committed by Toshio Kuratomi
parent 81a5183428
commit 4e94423e41
2 changed files with 8 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- ce_config - It is also necessary to undo mmi-mode enable after running commands.Otherwise it will make a effect to next tasks.(https://github.com/ansible/ansible/pull/60071).

View file

@ -261,7 +261,12 @@ def _load_config(module, config):
print_msg = print_msg2
module.fail_json(msg=print_msg)
exec_command(module, 'return')
rc, out, err = exec_command(module, 'return')
if rc != 0:
module.fail_json(msg='unable to return', output=err)
rc, out, err = exec_command(module, 'undo mmi-mode enable')
if rc != 0:
module.fail_json(msg='unable to undo mmi-mode enable', output=err)
def conversion_src(module):