1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/legacy/roles/scaleway_s3/tasks/aws_s3_delobj.yml
2018-11-09 16:16:53 +00:00

73 lines
1.4 KiB
YAML

- name: Delete an object (Check)
check_mode: yes
aws_s3:
mode: delobj
bucket: '{{ bucket_name }}'
s3_url: '{{ s3_url }}'
region: '{{ scaleway_region }}'
object: test.txt
encrypt: false
register: delobj_check_task
- name: Show delobj_check_task
debug:
var: delobj_check_task
- name: delobj_check_task is success
assert:
that:
- delobj_check_task is success
- name: delobj_check_task is changed
assert:
that:
- delobj_check_task is changed
- name: Delete an object
aws_s3:
mode: delobj
bucket: '{{ bucket_name }}'
s3_url: '{{ s3_url }}'
region: '{{ scaleway_region }}'
object: test.txt
encrypt: false
register: delobj_task
- name: Show delobj_task
debug:
var: delobj_task
- name: delobj_task is success
assert:
that:
- delobj_task is success
- name: delobj_task is changed
assert:
that:
- delobj_task is changed
- name: Delete an object (Confirmation)
aws_s3:
mode: delobj
bucket: '{{ bucket_name }}'
s3_url: '{{ s3_url }}'
region: '{{ scaleway_region }}'
object: test.txt
encrypt: false
register: delobj_confirmation_task
- name: Show delobj_confirmation_task
debug:
var: delobj_confirmation_task
- name: delobj_confirmation_task is success
assert:
that:
- delobj_confirmation_task is success
- name: delobj_confirmation_task is changed
assert:
that:
- delobj_confirmation_task is changed