Ansible role to backup folders to tar.gz and copy them to amazon s3 bucket.
You just need your ansible installation nothing more.
Variables in default.yml:
Configure local backup path where the role will generate the tar for the specified directories. local_backup_dir: /backups3
Configure environment for backups (demo, production, qa, etc)
customer: demo
AWS S3 bucket name
bucket_name: mybucket
Dictionary with each path to backup
paths_to_backup:
path1:
path: /var/www
tag: www
path2:
path: /var/test_backup
tag: test
AWS credentials
aws_access_key: aws_access_key
aws_secret_key: aws_secret_key
AWS access and secret key for account. This user must have read/write permissions for S3 service.
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- backups3
GPL v3
Daniela Torres Faria [email protected] www.danielatorres.me