mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 06:10:22 -07:00
ios_mods - added stdout to exception output. Removed to_lines() (#5428)
stdout lines are now available when certain exceptions occur (Ref ansible/ansible#18241) Also noticed that to_lines was essentially handled in lib/ansible/plugins/action/__init__.py -- only difference was it didn't handle a list. to_lines() could be removed across network modules now, but this commit is only for ios_command. Also adds disconnect() to ios_command that was added to ios_config in #5247
This commit is contained in:
parent
6806965bda
commit
ddd13bf53a
2 changed files with 4 additions and 9 deletions
|
@ -367,7 +367,7 @@ def main():
|
|||
except NetworkError:
|
||||
exc = get_exception()
|
||||
module.disconnect()
|
||||
module.fail_json(msg=str(exc))
|
||||
module.fail_json(msg=str(exc), stdout=exc.kwargs.get('stdout'))
|
||||
|
||||
module.disconnect()
|
||||
module.exit_json(**result)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue