2022-01-10 11:32:43 +01:00
|
|
|
---
|
2022-01-10 14:19:53 +01:00
|
|
|
- name: (SCHEDULE) (CRON) remove restic backup cronjob
|
2022-01-10 11:32:43 +01:00
|
|
|
ansible.builtin.cron:
|
|
|
|
name: "do1jlr.restic backup {{ item.name }}"
|
|
|
|
job: "CRON=true {{ restic_script_dir }}/backup-{{ item.name | replace(' ', '') }}.sh"
|
|
|
|
minute: '{{ item.schedule_minute | default("*") }}'
|
|
|
|
hour: '{{ item.schedule_hour | default("2") }}'
|
|
|
|
weekday: '{{ item.schedule_weekday | default("*") }}'
|
|
|
|
month: '{{ item.schedule_month | default("*") }}'
|
2022-01-18 18:01:39 +01:00
|
|
|
state: absent
|
2022-01-10 11:32:43 +01:00
|
|
|
user: 'root'
|
|
|
|
cron_file: restic_backup
|
|
|
|
become: true
|
|
|
|
no_log: "{{ restic_no_log }}"
|
|
|
|
with_items: '{{ restic_backups }}'
|
|
|
|
when:
|
|
|
|
- item.name is defined
|
|
|
|
- item.scheduled | default(false)
|