Skip to content

Commit

Permalink
Add waiter to the iam_role module (ansible-collections#767)
Browse files Browse the repository at this point in the history
Add waiter to the iam_role module

SUMMARY
This change adds the wait param used in other AWS modules, adding usage of a waiter for the iam_role creation / updates.
Currently there is no waiting done to ensure the iam_role has actually created and is available before exiting.
The tests have also been split up into separate files to make it a bit more manageable.
Fixes: ansible-collections#710
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
iam_role
ADDITIONAL INFORMATION
Successful run completed of the iam_role integration test suite locally:
ansible-test integration --docker centos8 -v iam_role --allow-unsupported
PLAY RECAP *********************************************************************
testhost                   : ok=198  changed=46   unreachable=0    failed=0    skipped=0    rescued=0    ignored=7   

AWS ACTIONS: ['iam:AddRoleToInstanceProfile', 'iam:AttachRolePolicy', 'iam:CreateInstanceProfile', 'iam:CreatePolicy', 'iam:CreateRole', 'iam:DeleteInstanceProfile', 'iam:DeletePolicy', 'iam:DeleteRole', 'iam:DeleteRolePermissionsBoundary', 'iam:DeleteRolePolicy', 'iam:DetachRolePolicy', 'iam:GetRole', 'iam:GetRolePolicy', 'iam:ListAttachedRolePolicies', 'iam:ListEntitiesForPolicy', 'iam:ListInstanceProfilesForRole', 'iam:ListPolicies', 'iam:ListPolicyVersions', 'iam:ListRolePolicies', 'iam:ListRoleTags', 'iam:ListRoles', 'iam:PutRolePermissionsBoundary', 'iam:PutRolePolicy', 'iam:RemoveRoleFromInstanceProfile', 'iam:TagRole', 'iam:UntagRole', 'iam:UpdateRole']
Run command: docker exec 56cb328c6d9af293d9e820e1f2a94fb8ca87e0769b2b9b6d46bad661f9edde65 tar czf /root/output.tgz --exclude .tmp -C /root/ansible/ansible_collections/community/aws/tests output
Run command: docker exec -i 56cb328c6d9af293d9e820e1f2a94fb8ca87e0769b2b9b6d46bad661f9edde65 dd if=/root/output.tgz bs=65536
Run command: tar oxzf /tmp/ansible-result-k2lnga3v.tgz -C /mnt/c/Users/mark.woolley/Documents/GitHub/public/ansible_collections/community/aws/tests
Run command: docker rm -f 56cb328c6d9af293d9e820e1f2a94fb8ca87e0769b2b9b6d46bad661f9edde65

Reviewed-by: Mark Chappell <None>
Reviewed-by: None <None>
  • Loading branch information
marknet15 authored and abikouo committed Sep 18, 2023
1 parent ecc22b0 commit 6d39e51
Showing 1 changed file with 120 additions and 69 deletions.
Loading

0 comments on commit 6d39e51

Please sign in to comment.