mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Added time trigger to clean up failed docker images at noon
This commit is contained in:
@@ -3,3 +3,10 @@
|
||||
name: cleanup-failed-docker-backups.service
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
||||
|
||||
- name: "restart cleanup-failed-docker-backups.timer"
|
||||
systemd:
|
||||
name: cleanup-failed-docker-backups.timer
|
||||
state: restarted
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
@@ -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
|
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=starts cleanup-failed-docker-backups.service
|
||||
|
||||
[Timer]
|
||||
OnCalendar={{on_calendar_cleanup_failed_docker}}
|
||||
RandomizedDelaySec={{randomized_delay_sec}}
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
Reference in New Issue
Block a user