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?
Jul 31 in Ansible by Roshan
379 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 Jul 31 by Varsha

Related Questions In Ansible

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 Jul 31 in Ansible by Vish
142 views