mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Fix OpenStack module failure output
The exception message, when shade fails, will contain much more specific information about the failure if the exception is treated as a string. The 'message' attribute alone is usually not helpful.
This commit is contained in:
committed by
Matt Clay
parent
18ff22348a
commit
aed44e8886
@@ -176,7 +176,7 @@ def main():
|
||||
module.exit_json(changed=True, floating_ip=f_ip)
|
||||
|
||||
except shade.OpenStackCloudException as e:
|
||||
module.fail_json(msg=e.message, extra_data=e.extra_data)
|
||||
module.fail_json(msg=str(e), extra_data=e.extra_data)
|
||||
|
||||
|
||||
# this is magic, see lib/ansible/module_common.py
|
||||
|
||||
Reference in New Issue
Block a user