1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

adds additional details in exception handling to ios shared module

This commit is contained in:
Peter Sprygada 2016-04-04 08:19:31 -04:00
parent 008395eda2
commit f5bcd38380

View file

@ -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)