mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
Improve aws_s3 permission handling for non S3 (#38574)
* Test case for missing permissions * Update aws_s3 module to latest standards * Use AnsibleAWSModule * Handle BotoCoreErrors properly * Test for BotoCoreErrors * Check for XNotImplemented exceptions (#38569) * Don't prematurely fail if user does not have s3:GetObject permission * Allow S3 drop-ins to ignore put_object_acl and put_bucket_acl
This commit is contained in:
parent
0ff04ad41b
commit
46886f8249
3 changed files with 78 additions and 38 deletions
|
@ -11,6 +11,19 @@
|
|||
no_log: yes
|
||||
|
||||
- block:
|
||||
- name: test create bucket without permissions
|
||||
aws_s3:
|
||||
bucket: "{{ bucket_name }}"
|
||||
mode: create
|
||||
register: result
|
||||
ignore_errors: yes
|
||||
|
||||
- name: assert nice message returned
|
||||
assert:
|
||||
that:
|
||||
- result is failed
|
||||
- "result.msg != 'MODULE FAILURE'"
|
||||
|
||||
- name: test create bucket
|
||||
aws_s3:
|
||||
bucket: "{{ bucket_name }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue