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

os_auth: display proper error message for exceptions (#20891)

This commit is contained in:
camradal 2017-02-23 03:04:43 -08:00 committed by Ricardo Carrillo Cruz
parent 352815ecbb
commit f7e426e636

View file

@ -72,8 +72,8 @@ def main():
ansible_facts=dict(
auth_token=cloud.auth_token,
service_catalog=cloud.service_catalog))
except shade.OpenStackCloudException as e:
module.fail_json(msg=str(e))
except Exception as e:
module.fail_json(msg=str(e), exception=traceback.format_exc())
# this is magic, see lib/ansible/module_common.py
from ansible.module_utils.basic import *