Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ec2_instance find_instances to fix incompatibility with Python 3.8 #767

Merged

Conversation

Razique
Copy link
Contributor

@Razique Razique commented Apr 2, 2022

SUMMARY

Update ec2_instance find_instances to use temporary dict. instead of inline changes. Fixes #709

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ec2_instance

ADDITIONAL INFORMATION

Current ec2_module iterates over a filters dictionary to perform hyphen to underscore substitution while popping keys in the process. This is not compatible with Python 3.8. I have simply created a second dictionary, I can also create a shallow copy via the copy() module if the team prefers.

to use temporary dict. instead of inline changes
@ansibullbot
Copy link

@ansibullbot ansibullbot added bug This issue/PR relates to a bug community_review module module needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) python3 labels Apr 2, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

Copy link
Contributor

@abikouo abikouo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@alinabuzachis
Copy link
Collaborator

recheck

Copy link
Contributor

@tremble tremble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Razique, one minor issue

plugins/modules/ec2_instance.py Show resolved Hide resolved
@tremble tremble added backport-2 PR should be backported to the stable-2 branch backport-3 PR should be backported to the stable-3 branch labels Apr 5, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@alinabuzachis
Copy link
Collaborator

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@tremble tremble added the mergeit Merge the PR (SoftwareFactory) label Apr 22, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build failed (gate pipeline). For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

@tremble
Copy link
Contributor

tremble commented Apr 25, 2022

regate

@softwarefactory-project-zuul
Copy link
Contributor

Build failed (gate pipeline). For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

@jillr
Copy link
Collaborator

jillr commented Apr 26, 2022

regate

@softwarefactory-project-zuul
Copy link
Contributor

Build failed (gate pipeline). For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

@alinabuzachis
Copy link
Collaborator

regate

@softwarefactory-project-zuul
Copy link
Contributor

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 0ca065c into ansible-collections:main May 3, 2022
@patchback
Copy link

patchback bot commented May 3, 2022

Backport to stable-2: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-2/0ca065cf55d6b8e9eb3a55e05c3134325d481416/pr-767

Backported as #800

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback
Copy link

patchback bot commented May 3, 2022

Backport to stable-3: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-3/0ca065cf55d6b8e9eb3a55e05c3134325d481416/pr-767

Backported as #801

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request May 3, 2022
… 3.8 (#767)

Update ec2_instance find_instances to fix incompatibility with Python 3.8

SUMMARY

Update ec2_instance find_instances to use temporary dict. instead of inline changes. Fixes #709

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

ec2_instance
ADDITIONAL INFORMATION
Current ec2_module iterates over a filters dictionary to perform hyphen to underscore substitution while popping keys in the process. This is not compatible with Python 3.8. I have simply created a second dictionary, I can also create a shallow copy via the copy() module if the team prefers.

Reviewed-by: Bikouo Aubin <None>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: Mark Chappell <None>
(cherry picked from commit 0ca065c)
patchback bot pushed a commit that referenced this pull request May 3, 2022
… 3.8 (#767)

Update ec2_instance find_instances to fix incompatibility with Python 3.8

SUMMARY

Update ec2_instance find_instances to use temporary dict. instead of inline changes. Fixes #709

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

ec2_instance
ADDITIONAL INFORMATION
Current ec2_module iterates over a filters dictionary to perform hyphen to underscore substitution while popping keys in the process. This is not compatible with Python 3.8. I have simply created a second dictionary, I can also create a shallow copy via the copy() module if the team prefers.

Reviewed-by: Bikouo Aubin <None>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: Mark Chappell <None>
(cherry picked from commit 0ca065c)
softwarefactory-project-zuul bot pushed a commit that referenced this pull request May 3, 2022
… 3.8 (#767) (#800)

[PR #767/0ca065cf backport][stable-2] Update ec2_instance find_instances to fix incompatibility with Python 3.8

This is a backport of PR #767 as merged into main (0ca065c).
SUMMARY

Update ec2_instance find_instances to use temporary dict. instead of inline changes. Fixes #709

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

ec2_instance
ADDITIONAL INFORMATION
Current ec2_module iterates over a filters dictionary to perform hyphen to underscore substitution while popping keys in the process. This is not compatible with Python 3.8. I have simply created a second dictionary, I can also create a shallow copy via the copy() module if the team prefers.

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Jill R <None>
@Razique Razique deleted the issue-709 branch May 17, 2022 21:53
softwarefactory-project-zuul bot pushed a commit that referenced this pull request May 19, 2022
… 3.8 (#767) (#801)

[PR #767/0ca065cf backport][stable-3] Update ec2_instance find_instances to fix incompatibility with Python 3.8

This is a backport of PR #767 as merged into main (0ca065c).
SUMMARY

Update ec2_instance find_instances to use temporary dict. instead of inline changes. Fixes #709

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

ec2_instance
ADDITIONAL INFORMATION
Current ec2_module iterates over a filters dictionary to perform hyphen to underscore substitution while popping keys in the process. This is not compatible with Python 3.8. I have simply created a second dictionary, I can also create a shallow copy via the copy() module if the team prefers.

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Mark Chappell <None>
alinabuzachis pushed a commit to alinabuzachis/amazon.aws that referenced this pull request Sep 7, 2023
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>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@81d9abd
alinabuzachis pushed a commit to alinabuzachis/amazon.aws that referenced this pull request Sep 7, 2023
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>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@81d9abd
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Sep 18, 2023
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>
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Sep 18, 2023
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>
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Sep 20, 2023
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>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@81d9abd
alinabuzachis pushed a commit to alinabuzachis/amazon.aws that referenced this pull request Oct 6, 2023
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>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@81d9abd
alinabuzachis pushed a commit to alinabuzachis/amazon.aws that referenced this pull request Oct 6, 2023
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>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@81d9abd
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Oct 20, 2023
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>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@81d9abd
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Oct 24, 2023
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-2 PR should be backported to the stable-2 branch backport-3 PR should be backported to the stable-3 branch bug This issue/PR relates to a bug community_review mergeit Merge the PR (SoftwareFactory) module module new_contributor Help guide this first time contributor plugins plugin (any type) python3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ec2_instance module broken in Python 3.8 - dict keys modified during iteration
6 participants