Skip to content

Commit

Permalink
Merge pull request ansible-collections#682 from tremble/botocore/aws_…
Browse files Browse the repository at this point in the history
…s3_bucket_info

aws_s3_bucket_info - Add a check for botocore>='1.18.11' when pulling bucket_ownership_controls

SUMMARY
Fetching bucket_ownership_controls requires botocore>='1.18.11' add a check and update the tests to explicitly require this version of botocore when testing accessing bucket_ownership_controls
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
aws_s3_bucket_info
ADDITIONAL INFORMATION
Depends-On: ansible-collections#686

Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
  • Loading branch information
ansible-zuul[bot] authored Aug 12, 2021
2 parents 9c5e508 + e69097c commit a8cb863
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion aws_s3_bucket_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@
type: bool
default: False
bucket_ownership_controls:
description: Retrive S3 ownership controls.
description:
- Retrive S3 ownership controls.
- Access to bucket ownership controls requires botocore>=1.18.11.
type: bool
default: False
bucket_website:
Expand Down Expand Up @@ -593,6 +595,9 @@ def main():
module.deprecate("The 'aws_s3_bucket_facts' module has been renamed to 'aws_s3_bucket_info', "
"and the renamed one no longer returns ansible_facts", date='2021-12-01', collection_name='community.aws')

if module.params.get("bucket_ownership_controls"):
module.require_botocore_at_least('1.18.11', reason='to retreive bucket ownership controls')

# Get parameters
name = module.params.get("name")
name_filter = module.params.get("name_filter")
Expand Down

0 comments on commit a8cb863

Please sign in to comment.