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?
Jul 31, 2019 in Ansible by Adarsh
1,716 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 Jul 31, 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,040 points
4,441 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
961 views
+1 vote
2 answers

AWS CloudWatch Logs in Docker

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

answered Sep 6, 2018 in AWS by bug_seeker
• 15,550 points
916 views