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

30 lines
863 B
YAML
Raw Permalink Normal View History

2019-08-13 13:26:40 +02:00
---
2023-10-22 20:33:44 +02:00
- name: Run optional versionscheck
2021-05-11 00:14:17 +02:00
ansible.builtin.include_tasks: versioncheck.yml
2023-10-22 20:33:44 +02:00
when: submodules_versioncheck | bool
2019-08-13 13:26:40 +02:00
2023-10-22 20:33:44 +02: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
2023-10-22 20:33:44 +02:00
- name: Setup logrotate
2021-05-11 00:14:17 +02:00
ansible.builtin.include_tasks: logs.yml
2020-12-14 15:50:39 +01:00
when: restic_archiver__log_output | bool
2023-10-22 20:33:44 +02:00
- name: Create cronjob
2021-05-11 00:14:17 +02:00
ansible.builtin.include_tasks: cron.yml
2021-12-07 19:50:02 +01:00
when: not restic_archiver__use_systemd_timer | bool
2023-10-22 20:33:44 +02:00
- name: Create systemd timer
2021-12-07 19:50:02 +01:00
ansible.builtin.include_tasks: systemd.yml
when: restic_archiver__use_systemd_timer | bool
2020-12-14 16:05:01 +01:00
2023-10-22 20:33:44 +02:00
- name: Install requirements for mailing
2021-05-11 00:14:17 +02:00
ansible.builtin.include_tasks: mail.yml
2020-12-14 16:05:01 +01:00
when: restic_archiver__mailsummary | bool