Optimized code performance

This commit is contained in:
Kevin Veen-Birkenbach 2023-12-26 03:31:30 +01:00
parent 8863a00908
commit aeb64aaa45

View File

@ -19,15 +19,16 @@
notify: reload cleanup-failed-docker-backups.service daemon
when: run_once_cleanup_failed_docker_backups is not defined
- name: run the cleanup_failed_docker_backups tasks once
set_fact:
run_once_cleanup_failed_docker_backups: true
when: run_once_cleanup_failed_docker_backups is not defined
- name: create cleanup-failed-docker-backups.timer
template:
src: cleanup-failed-docker-backups.timer.j2
dest: /etc/systemd/system/cleanup-failed-docker-backups.timer
register: cleanup_failed_docker_backups_timer
changed_when: cleanup_failed_docker_backups_timer.changed or activate_all_timers | bool
notify: restart cleanup-failed-docker-backups.timer
notify: restart cleanup-failed-docker-backups.timer
when: run_once_cleanup_failed_docker_backups is not defined
- name: run the cleanup_failed_docker_backups tasks once
set_fact:
run_once_cleanup_failed_docker_backups: true
when: run_once_cleanup_failed_docker_backups is not defined