mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
adds additional details in exception handling to ios shared module
This commit is contained in:
@@ -127,6 +127,8 @@ class NetworkModule(AnsibleModule):
|
||||
def execute(self, commands, **kwargs):
|
||||
try:
|
||||
return self.connection.send(commands, **kwargs)
|
||||
except ShellError, exc:
|
||||
self.fail_json(msg=exc.message, command=exc.command)
|
||||
except Exception, exc:
|
||||
self.fail_json(msg=exc.message, commands=commands)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user