Ansible task to copy file to S3 bucket

0 votes
How do I write an ansible playbook/task to copy a file to an s3 bucket? Is this even possible?
Aug 1, 2019 in Ansible by Adarsh
4,270 views

1 answer to this question.

0 votes

Hey @Adarsh, try this task definition:

---
- hosts: localhost
  become: true
  tasks:
  - name: Copy file to S3 bucket
    s3: aws_access_key=<AccessKey> aws_secret_key=<Secret Key> bucket=example object=/niru.txt src=/home/ansible/example.txt mode=put
answered Aug 1, 2019 by Vish

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer
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,460 points
20,510 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,036 views
+1 vote
2 answers

AWS CloudWatch Logs in Docker

The awslogs works without using ECS. you need to configure ...READ MORE

answered Sep 7, 2018 in AWS by bug_seeker
• 15,510 points
2,032 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