Skip to content

Commit

Permalink
Merge pull request ansible-collections#697 from mandar242/issues-204-…
Browse files Browse the repository at this point in the history
…update-iam-role

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] authored 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.
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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.