Added time trigger to clean up failed docker images at noon

This commit is contained in:
2023-12-18 12:20:05 +01:00
parent 2be16a16f6
commit b47c6b5d8f
4 changed files with 27 additions and 1 deletions

View File

@@ -22,4 +22,12 @@
- 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
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_disc_space_timer
changed_when: cleanup_disc_space_timer.changed or activate_all_timers | bool
notify: restart cleanup-failed-docker-backups.timer