mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Fix error handling
This commit is contained in:
@@ -853,7 +853,8 @@ def main():
|
|||||||
try:
|
try:
|
||||||
apply_patch(module, commands)
|
apply_patch(module, commands)
|
||||||
changed=True
|
changed=True
|
||||||
except Exception as e:
|
except ShellError:
|
||||||
|
e = get_exception()
|
||||||
module.fail_json(msg=str(e))
|
module.fail_json(msg=str(e))
|
||||||
|
|
||||||
module.exit_json(changed=changed,
|
module.exit_json(changed=changed,
|
||||||
|
|||||||
Reference in New Issue
Block a user