blob: 0b08cbeede72b198f77e3fa2549f157fe8913a1e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
---
- name: empty S3 bucket
block:
- name: get S3 object list
aws_s3:
bucket: "{{ openshift_aws_s3_bucket_name }}"
mode: list
region: "{{ openshift_aws_region }}"
register: s3_out
- name: delete S3 objects
aws_s3:
bucket: "{{ openshift_aws_s3_bucket_name }}"
mode: delobj
object: "{{ item }}"
with_items: "{{ s3_out.s3_keys }}"
when: openshift_aws_create_s3 | bool
- name: delete S3 bucket
aws_s3:
bucket: "{{ openshift_aws_s3_bucket_name }}"
mode: delete
region: "{{ openshift_aws_region }}"
when:
- openshift_aws_create_s3 | bool
- openshift_aws_really_delete_s3_bucket | bool
|