mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-22 12:03:58 -07:00
[cloud] Convert s3
module to use boto3 (#21529)
* replace boto with boto3 for the s3 module make s3 pep8 and remove from legacy files fix s3 unit tests * fix indentation * s3 module - if we can't create an MD5 sum return None and always upload file * remove Location.DEFAULT which isn't used in boto3 and tidy up the docs * pep8 * s3: remove default: null, empty aliases, and required: false from documentation fix incorrectly documented defaults * Porting s3 to boto3. Simplify some logic and remove unused imports * Fix s3 module variables * Fix a typo in s3 module and remove from pep8 legacy files * s3: add pagination for listing objects. Fix logic and use head_object instead of get_object for efficiency. Fix typo in unit test. * Fix pagination to maintain backwards compatibility. Fix incorrect conditional. Remove redundant variable assignment. Fix s3 list_object pagination to return all pages * Use the revised List Objects API as recommended. * Wrap call to paginated_list in a try/except Also remembered to allow marker/prefix/max_keys to modify what keys are listed * Simplify argument
This commit is contained in:
parent
7d1308b0d8
commit
1de91a9aa0
4 changed files with 289 additions and 311 deletions
|
@ -55,7 +55,6 @@ lib/ansible/modules/cloud/amazon/rds_param_group.py
|
|||
lib/ansible/modules/cloud/amazon/rds_subnet_group.py
|
||||
lib/ansible/modules/cloud/amazon/redshift.py
|
||||
lib/ansible/modules/cloud/amazon/route53_health_check.py
|
||||
lib/ansible/modules/cloud/amazon/s3.py
|
||||
lib/ansible/modules/cloud/amazon/s3_lifecycle.py
|
||||
lib/ansible/modules/cloud/amazon/s3_logging.py
|
||||
lib/ansible/modules/cloud/amazon/s3_website.py
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue