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

This commit is contained in:
Sloane Hertel 2018-01-31 13:18:09 -05:00 committed by Ryan Brown
parent 9dad5d6b7f
commit 556bb7ab00
2 changed files with 5 additions and 2 deletions

View file

@ -239,9 +239,11 @@ def create_or_update_role(connection, module):
role = connection.create_role(**params) role = connection.create_role(**params)
changed = True changed = True
except ClientError as e: 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: 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: else:
# Check Assumed Policy document # Check Assumed Policy document
if not compare_assume_role_policy_doc(role['AssumeRolePolicyDocument'], params['AssumeRolePolicyDocument']): if not compare_assume_role_policy_doc(role['AssumeRolePolicyDocument'], params['AssumeRolePolicyDocument']):

View file

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