Files
Terraform/roles/lib/setup-restic.yml
tolerryan 0e2e7bff28 test
2024-10-14 00:59:45 -05:00

36 lines
812 B
YAML

---
- name: backup your homefolders to /mnt/backup everyday night
hosts: all
become: yes
remote_user: ansible
gather_facts: false
roles:
- {role: do1jlr.restic, tags: restic}
vars:
restic_create_schedule: true
restic_repos:
misamisa:
location: sftp:misamisa://home/restic/
password: 'ChangM3'
init: true
restic_backups:
home:
name: home
repo: misamisa
src: /home/
scheduled: true
schedule_oncalendar: '*-*-* 01:00:00'
tasks:
- name: Create SSH config file
copy:
dest: /home/docker/.ssh/config
content: |
Hostname misamisa.duckdns.org
Port 25456
User restic
IdentityFile vm
owner: docker
group: docker
mode: '0640'