Implemented -e "activate_all_timers=true"

This commit is contained in:
2023-11-16 19:43:54 +01:00
parent c913d1f62c
commit 298b1d106e
20 changed files with 42 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
- name: "restart backups-cleanup.timer"
- name: "restart cleanup-backups.timer"
systemd:
name: backups-cleanup.timer
name: cleanup-backups.timer
state: restarted
enabled: yes
daemon_reload: yes

View File

@@ -1,5 +1,7 @@
- name: create backups-cleanup.timer
- name: create cleanup-backups.timer
template:
src: "backups-cleanup.timer.j2"
dest: "/etc/systemd/system/backups-cleanup.timer"
notify: restart backups-cleanup.timer
src: "cleanup-backups.timer.j2"
dest: "/etc/systemd/system/cleanup-backups.timer"
register: cleanup_backups_timer
changed_when: cleanup_backups_timer.changed or activate_all_timers | default(false) | bool
notify: restart cleanup-backups.timer

View File

@@ -1,5 +1,5 @@
[Unit]
Description=starts backups-cleanup.service
Description=starts cleanup-backups.service
[Timer]
OnCalendar={{on_calendar_backups_cleanup}}