homeserver/playbooks/on-off/remove_old_restic_cronjob.yml
mg ffd264e3ec Script user für restic erstellt (#260)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#260
Co-authored-by: mg <michael.grote@posteo.de>
Co-committed-by: mg <michael.grote@posteo.de>
2022-02-09 10:06:37 +01:00

12 lines
401 B
YAML

---
- hosts: all
tasks:
- name: remove restic cronjob
become: yes
ansible.builtin.cron:
name: restic
state: absent
job: "/usr/local/bin/restic_backup.sh"
minute: "{{ 59|random(seed=inventory_hostname) }}"
hour: "{{ restic_cron_hours }}"
# siehe: https://stackoverflow.com/questions/33379378/idempotence-and-random-variables-in-ansible