Ansible task to download a file from an S3 bucket

0 votes
Is it possible to have an ansible playbook to download a file from an s3 bucket? How do I do that?
Aug 1, 2019 in Ansible by Roshan
6,798 views

1 answer to this question.

0 votes

Hey @Roshan, ansible provides wiht AWS module which lets you write playbooks for accessing aws resources. Try the following task:

---
- hosts: localhost
  become: true
  tasks:
  - name: Download file from S3 bucket
    s3: aws_access_key=<AccessKey> aws_secret_key=<Secret Key> bucket=example object=/niru.txt dest=/home/ansible/example.txt mode=get
answered Aug 1, 2019 by Varsha

Related Questions In Ansible

0 votes
1 answer

How to move/rename a file using an Ansible task on a remote system?

Hi@akhtar, You can use the command module to ...READ MORE

answered Sep 17, 2020 in Ansible by MD
• 95,440 points
19,259 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
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
3,874 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