init
This commit is contained in:
commit
883f31932e
169 changed files with 5676 additions and 0 deletions
20
ansible/roles/restic/tasks/restore-restic.yml
Normal file
20
ansible/roles/restic/tasks/restore-restic.yml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
-
|
||||
name: Install restic
|
||||
apt:
|
||||
name: restic
|
||||
state: present
|
||||
update_cache: yes
|
||||
|
||||
-
|
||||
name: Restore latest snapshot from S3
|
||||
command: >
|
||||
restic restore latest
|
||||
--repo s3:{{ s3_endpoint }}/{{ s3_bucket }}/{{ host_id }}
|
||||
--target /
|
||||
{{ '--include ' + restore_include if restore_include is defined else '' }}
|
||||
environment:
|
||||
RESTIC_PASSWORD: "{{ password }}"
|
||||
AWS_ACCESS_KEY_ID: "{{ s3_access_key_id }}"
|
||||
AWS_SECRET_ACCESS_KEY: "{{ s3_secret_access_key }}"
|
||||
no_log: true
|
||||
Loading…
Add table
Add a link
Reference in a new issue