mirror of
https://github.com/roles-ansible/ansible_role_restic/
synced 2024-11-09 21:33:31 +01:00
18 lines
664 B
YAML
18 lines
664 B
YAML
---
|
|
- name: (SCHEDULE) (CRON) remove restic backup cronjob
|
|
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("*") }}'
|
|
state: present
|
|
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)
|