From 8f4daf84c88106a2fd3f87d5fa841904dfbe8729 Mon Sep 17 00:00:00 2001 From: James Mighion Date: Thu, 21 Jun 2018 11:52:35 -0700 Subject: [PATCH] Revert "Fixes #35622 (#41522)" (#41805) This reverts commit 8357ae69e71081a6eabada733974204a11efd225. --- lib/ansible/module_utils/network/aireos/aireos.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/ansible/module_utils/network/aireos/aireos.py b/lib/ansible/module_utils/network/aireos/aireos.py index d6d9d37017..e31a422110 100644 --- a/lib/ansible/module_utils/network/aireos/aireos.py +++ b/lib/ansible/module_utils/network/aireos/aireos.py @@ -114,14 +114,13 @@ def run_commands(module, commands, check_rc=True): def load_config(module, commands): + rc, out, err = exec_command(module, 'config') if rc != 0: module.fail_json(msg='unable to enter configuration mode', err=to_text(out, errors='surrogate_then_replace')) - commands = to_commands(module, to_list(commands)) - for command in commands: - command = module.jsonify(command) - if "\"command\": \"end\"" in command: + for command in to_list(commands): + if command == 'end': continue rc, out, err = exec_command(module, command) if rc != 0: