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?
Aug 1, 2019 in Ansible by Jinu
1,121 views

1 answer to this question.

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

---
- hosts: localhost
  become: true
  tasks:
  - 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 Aug 1, 2019 by Barbara

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer

How to create an S3 bucket using Ansible Playbook?

Hi@akhtar, Ansible has a module that can create ...READ MORE

answered Dec 4, 2020 in Ansible by MD
• 95,460 points
2,252 views
0 votes
1 answer

How to remove an S3 bucket using Ansible playbook?

Hi@akhtar, You can create or remove an S3 ...READ MORE

answered Dec 4, 2020 in Ansible by MD
• 95,460 points
1,292 views
0 votes
1 answer

Ansible task to copy file to S3 bucket

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

answered Aug 1, 2019 in Ansible by Vish
4,270 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP