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 in Ansible by Adarsh
31 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 by Vish

Related Questions In Ansible

+1 vote
1 answer

Is it possible to append a large amount of text to a file using Ansible?

Here is concept which you can follow. blockinfile is ...READ MORE

answered Jul 30, 2018 in Ansible by Atul
• 10,240 points
2,502 views
+13 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,380 points
152 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,350 points
332 views