From f7e426e6361437a23fdb2fa441f6e020839d3959 Mon Sep 17 00:00:00 2001 From: camradal Date: Thu, 23 Feb 2017 03:04:43 -0800 Subject: [PATCH] os_auth: display proper error message for exceptions (#20891) --- lib/ansible/modules/cloud/openstack/os_auth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/cloud/openstack/os_auth.py b/lib/ansible/modules/cloud/openstack/os_auth.py index 9e433aba3b..e5dd7542d8 100644 --- a/lib/ansible/modules/cloud/openstack/os_auth.py +++ b/lib/ansible/modules/cloud/openstack/os_auth.py @@ -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 *