mirror of
https://github.com/roles-ansible/ansible_role_restic/
synced 2024-11-14 23:50:19 +01:00
e0f3f5c87c
improves the handling and differentiation of cronjobs and systemd timers. Rename the ``restic_create_cron`` variable to``restic_create_schedule``. Now new: ``restic_schedule_type: "systemd"``. RESOLVE #22
13 lines
379 B
YAML
13 lines
379 B
YAML
---
|
|
- name: systemctl restart restic.timer
|
|
become: true
|
|
ansible.builtin.systemd:
|
|
name: "restic-{{ item.name | replace(' ', '') | string }}.timer"
|
|
state: 'restarted'
|
|
daemon_reload: true
|
|
with_items: '{{ restic_backups }}'
|
|
when:
|
|
- restic_create_schedule
|
|
- item.name is defined
|
|
- item.scheduled | default(false)
|
|
- ansible_service_mgr == 'systemd'
|