mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 12:21:26 -07:00
fixes ios and eos command modules (#20989)
* returns support for prompt/response over cli * now sends native dict instead of str command * fixes issue with run_commands() in ios to jsonify request * updates unit test cases
This commit is contained in:
parent
62c97cdd3e
commit
d226f31a0f
5 changed files with 8 additions and 10 deletions
|
@ -47,6 +47,7 @@ def get_config(module, flags=[]):
|
|||
def run_commands(module, commands, check_rc=True):
|
||||
responses = list()
|
||||
for cmd in to_list(commands):
|
||||
cmd = module.jsonify(cmd)
|
||||
rc, out, err = module.exec_command(cmd)
|
||||
if check_rc and rc != 0:
|
||||
module.fail_json(msg=err, rc=rc)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue