Delete an object/file from an s3 bucket

0 votes
How do I write a playbook/task to delete a file from an S3 bucket?
Jul 31, 2019 in Ansible by Jinu

1 answer to this question.

0 votes
Hey @Jinu, you can try the following ansible task:

- hosts: localhost
  become: true
  - name: Delete an S3 bucket
    aws_s3: aws_access_key=<AccessKey> aws_secret_key=<Secret Key> bucket=example object=/development/example.txt mode=delobj
answered Jul 31, 2019 by Barbara

Related Questions In Ansible

0 votes
1 answer
+1 vote
1 answer

Ansible: Deleting matching IPs from hosts file using regex

Ansible notation isn't the same as YAML ...READ MORE

answered Jul 25, 2018 in Ansible by DareDev
• 6,850 points
0 votes
1 answer

Set an explicit inventory file - Kubespray

Hi @Isha, Go to /etc/ansible/ansible.cfg In the default section ...READ MORE

answered Jan 23, 2019 in Ansible by Yesha
0 votes
1 answer

Ansible task to copy file to S3 bucket

Hey @Adarsh, try this task definition: --- - hosts: ...READ MORE

answered Jul 31, 2019 in Ansible by Vish