1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_restic_archiver.git synced 2024-08-16 10:09:49 +02:00
ansible_role_restic_archiver/tasks/main.yml

28 lines
730 B
YAML

---
- include_tasks: versioncheck.yml
when: submodules_versioncheck|bool
- name: deploy restic template
template:
src: templates/restic_forget_snapshots.j2
dest: /opt/restic-backup.sh
group: "{{ restic_archiver__owner }}"
owner: "{{ restic_archiver__group }}"
mode: 0700
become: true
- name: install cron
become: true
package:
name: "{{ restic_archiver__package }}"
state: present
- name: setup cronjob for restic
become: true
cron:
name: "archive restic backup with ansible_role_restic_archiver"
job: /opt/restic-backup.sh
cron_file: /etc/crontab
hour: "{{ restic_archiver__hour }}"
minute: "{{ restic_archiver__minute }}"
user: "{{ restic_archiver__owner }}"