Skip to content

Commit

Permalink
Merge pull request #697 from mandar242/issues-204-update-iam-role
Browse files Browse the repository at this point in the history
iam_role: replace UpdateRoleDescription with use UpdateRole

SUMMARY

Modified iam_role.py to replace update_role_description (deprecated) with update_role action call.

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

iam_role

Reviewed-by: Mark Chappell <None>
Reviewed-by: Jill R <None>
Reviewed-by: None <None>
  • Loading branch information
ansible-zuul[bot] committed Aug 24, 2021
2 parents a7c1ac3 + 2a5a4dd commit 24940d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
@@ -0,0 +1,2 @@
bugfixes:
- iam_role - Modified iam_role internal code to replace update_role_description with update_role (https://github.com/ansible-collections/community.aws/pull/697).
2 changes: 1 addition & 1 deletion plugins/modules/iam_role.py
Expand Up @@ -327,7 +327,7 @@ def update_role_description(connection, module, params, role):
return True

try:
connection.update_role_description(RoleName=params['RoleName'], Description=params['Description'], aws_retry=True)
connection.update_role(RoleName=params['RoleName'], Description=params['Description'], aws_retry=True)
except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e:
module.fail_json_aws(e, msg="Unable to update description for role {0}".format(params['RoleName']))
return True
Expand Down

0 comments on commit 24940d4

Please sign in to comment.