2019-08-13 13:26:40 +02:00
|
|
|
---
|
2021-05-11 00:14:17 +02:00
|
|
|
- name: run optional versionscheck
|
|
|
|
ansible.builtin.include_tasks: versioncheck.yml
|
2020-12-07 18:32:04 +01:00
|
|
|
when: submodules_versioncheck|bool
|
2019-08-13 13:26:40 +02:00
|
|
|
|
2020-12-14 11:19:18 +01:00
|
|
|
- name: deploy restic template
|
2021-05-11 00:14:17 +02:00
|
|
|
ansible.builtin.template:
|
2020-12-09 17:26:16 +01:00
|
|
|
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
|
|
|
|
2021-05-11 00:14:17 +02:00
|
|
|
- name: setup logrotate
|
|
|
|
ansible.builtin.include_tasks: logs.yml
|
2020-12-14 15:50:39 +01:00
|
|
|
when: restic_archiver__log_output | bool
|
2020-12-14 12:02:36 +01:00
|
|
|
|
2021-05-11 00:14:17 +02:00
|
|
|
- name: create cronjob
|
|
|
|
ansible.builtin.include_tasks: cron.yml
|
|
|
|
# todo: replace with systemd timer
|
2020-12-14 16:05:01 +01:00
|
|
|
|
2021-05-11 00:14:17 +02:00
|
|
|
- name: install requirements for mailing
|
|
|
|
ansible.builtin.include_tasks: mail.yml
|
2020-12-14 16:05:01 +01:00
|
|
|
when: restic_archiver__mailsummary | bool
|