2023-11-16 19:43:54 +01:00
|
|
|
- name: create cleanup-backups.timer
|
2023-05-02 17:58:16 +02:00
|
|
|
template:
|
2023-11-16 19:43:54 +01:00
|
|
|
src: "cleanup-backups.timer.j2"
|
|
|
|
dest: "/etc/systemd/system/cleanup-backups.timer"
|
|
|
|
register: cleanup_backups_timer
|
2024-01-03 12:07:19 +01:00
|
|
|
changed_when: cleanup_backups_timer.changed or activate_all_timers | bool
|
2023-11-16 19:43:54 +01:00
|
|
|
notify: restart cleanup-backups.timer
|
2023-12-12 15:10:11 +01:00
|
|
|
when: run_once_cleanup_backups_timer is not defined
|
|
|
|
|
|
|
|
- name: run the cleanup_backups_timer tasks once
|
|
|
|
set_fact:
|
|
|
|
run_once_cleanup_backups_timer: true
|
|
|
|
when: run_once_cleanup_backups_timer is not defined
|