2019-08-13 13:26:40 +02:00
|
|
|
---
|
2020-12-07 18:32:04 +01:00
|
|
|
- include_tasks: versioncheck.yml
|
|
|
|
when: submodules_versioncheck|bool
|
2019-08-13 13:26:40 +02:00
|
|
|
|
2020-12-14 11:19:18 +01:00
|
|
|
- name: deploy restic template
|
2020-12-09 17:26:16 +01:00
|
|
|
template:
|
|
|
|
src: templates/restic_forget_snapshots.j2
|
2020-12-14 11:19:18 +01:00
|
|
|
dest: /opt/restic-backup.sh
|
|
|
|
group: "{{ restic_archiver__owner }}"
|
|
|
|
owner: "{{ restic_archiver__group }}"
|
2020-12-09 17:54:53 +01:00
|
|
|
mode: 0700
|
2020-12-14 11:19:18 +01:00
|
|
|
become: true
|
2020-12-09 17:42:54 +01:00
|
|
|
|
2020-12-14 12:02:36 +01:00
|
|
|
- name: install cron
|
|
|
|
become: true
|
|
|
|
package:
|
|
|
|
name: "{{ restic_archiver__package }}"
|
|
|
|
state: present
|
|
|
|
|
2020-12-14 11:19:18 +01:00
|
|
|
- name: setup cronjob for restic
|
|
|
|
become: true
|
|
|
|
cron:
|
|
|
|
name: "archive restic backup with ansible_role_restic_archiver"
|
|
|
|
job: /opt/restic-backup.sh
|
2020-12-14 11:36:08 +01:00
|
|
|
cron_file: /etc/crontab
|
2020-12-14 11:19:18 +01:00
|
|
|
hour: "{{ restic_archiver__hour }}"
|
|
|
|
minute: "{{ restic_archiver__minute }}"
|
2020-12-14 11:36:08 +01:00
|
|
|
user: "{{ restic_archiver__owner }}"
|