项目作者: derJD

项目描述 :
Ansible role making simple encrypted backups into S3 using systemd timers and a script
高级语言: Shell
项目地址: git://github.com/derJD/ansible-s3-backup.git
创建时间: 2020-02-03T13:17:30Z
项目社区:https://github.com/derJD/ansible-s3-backup

开源协议:

下载


s3_backup

Create encrypted backups once a day and push them into S3.
Last 14 versions will be kept.

In order to work properly you must specify following variables:

  • s3_backup_access_key (string)
  • s3_backup_secret_key (string)
  • s3_backup_configs (complex)

Requirements

S3 Endpoint must support SSE-C.

Role Variables

Variable Type Default Description
s3_backup_region string us-east-1 Default region
s3_backup_endpoint string s3.amazonaws.com Endpoint to connect to. Works with S3-Compatible endpoinds as well (At least cephs rados s3)
s3_backup_access_key string “” Access Key
s3_backup_secret_key string “” Secret Key
s3_backup_credentials dict { aws_access_key_id: “{{ s3_backup_access_key }}”, aws_secret_access_key: “{{ s3_backup_secret_key }}” } Wrapper for writing access and secret key into credentials config
s3_backup_configs complex {} Configuration for Backups. Each element must contain name, src, dst, key. See Example Playbook

Dependencies

None so far…

Example Playbook

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

  1. - hosts: servers
  2. vars:
  3. s3_backup_access_key: AAABBBCCC
  4. s3_backup_secret_key: DDDEEEFFF
  5. s3_backup_configs:
  6. - name: gitlab-config
  7. src: /etc/gitlab/
  8. dst: gitlab-config
  9. key: abcdefgh12345678abcdefgh12345678
  10. - name: icinga2-ca
  11. src: /var/lib/icinga2/ca/
  12. dst: icinga2-ca
  13. key: abcdefgh12345678abcdefgh12345678
  14. roles:
  15. - derJD.s3_backup

License

BSD

Author Information

An optional section for the role authors to include contact information, or a website (HTML is not allowed).