ansible_role_restic/handlers/main.yml

14 lines
379 B
YAML
Raw Normal View History

---
- 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'