24 lines
591 B
YAML
24 lines
591 B
YAML
# Do not need as a playbook if included inside another playbook
|
|
#---
|
|
#- name: Setup restic cron jobs
|
|
# hosts: all
|
|
# become: yes
|
|
# remote_user: ansible
|
|
# gather_facts: false
|
|
|
|
# vars_files:
|
|
# - cron.vars
|
|
|
|
tasks:
|
|
- name: Set up restic cron jobs
|
|
cron:
|
|
name: "{{ item.job_name }}"
|
|
minute: "{{ item.job_minute }}"
|
|
hour: "{{ item.job_hour }}"
|
|
weekday: "{{ item.job_day }}"
|
|
job: "{{ item.job_command }}"
|
|
user: "{{ item.user }}"
|
|
state: present
|
|
loop: "{{ cronjob }}"
|
|
loop_control:
|
|
label: "{{ item.name }}" |