[cloud] Log more exception info to fix sts_assume_role integration tests (#35570)

pull/35578/head
Sloane Hertel 7 years ago committed by Ryan Brown
parent 9dad5d6b7f
commit 556bb7ab00

@ -239,9 +239,11 @@ def create_or_update_role(connection, module):
role = connection.create_role(**params)
changed = True
except ClientError as e:
module.fail_json(msg="Unable to create role", exception=traceback.format_exc(), **camel_dict_to_snake_dict(e.response))
module.fail_json(msg="Unable to create role: {0}".format(to_native(e)),
exception=traceback.format_exc(), **camel_dict_to_snake_dict(e.response))
except BotoCoreError as e:
module.fail_json(msg="Unable to create role", exception=traceback.format_exc())
module.fail_json(msg="Unable to create role: {0}".format(to_native(e)),
exception=traceback.format_exc())
else:
# Check Assumed Policy document
if not compare_assume_role_policy_doc(role['AssumeRolePolicyDocument'], params['AssumeRolePolicyDocument']):

@ -1,2 +1,3 @@
cloud/aws
posix/ci/cloud/group1/aws
iam_role

Loading…
Cancel
Save