mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
This reverts commit 8357ae69e7
.
This commit is contained in:
parent
c7a5e9d4eb
commit
8f4daf84c8
1 changed files with 3 additions and 4 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue