reworked timer install logic

This commit is contained in:
Frank Dornheim 2023-03-08 15:19:10 +01:00
parent 05baedc841
commit 7414f85e39

View File

@ -0,0 +1,22 @@
---
- name: Create borgbackup timer
when:
- install_backup is not defined or install_backup
- borgmatic_timer is defined and borgmatic_timer == "systemd"
tags:
- install_backup
block:
- name: Timer Systemd
ansible.builtin.include_tasks:
file: noauto_create_timer.yml
- name: Create borgbackup cron
when:
- install_backup is not defined or install_backup
- borgmatic_timer is defined or not borgmatic_timer == "systemd"
tags:
- install_backup
block:
- name: Install cron backup job
ansible.builtin.include_tasks:
file: noauto_create_cronjobs.yml