Tie podman-image-prune to podman-auto-update
This commit is contained in:
parent
da2236a6cd
commit
814cec050f
@ -1,6 +1,7 @@
|
||||
[Unit]
|
||||
Description=Prune dangling podman images
|
||||
Documentation=man:podman-image-prune(1)
|
||||
After=podman-auto-update.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
@ -8,4 +9,4 @@ ExecStartPre=/usr/bin/podman container prune -f
|
||||
ExecStart=/usr/bin/podman image prune -f
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=podman-auto-update.service
|
||||
|
@ -113,12 +113,6 @@
|
||||
dest: "{{ service_home }}/.config/systemd/user/podman-image-prune.service"
|
||||
register: user_systemd_podman_image_prune_service_file
|
||||
|
||||
- name: Copy systemd image prune timer for user {{ service_user_name }}
|
||||
copy:
|
||||
src: "./filesystem/common/var/lib/_hostname/home/_service_user_name/.config/systemd/user/podman-image-prune.timer"
|
||||
dest: "{{ service_home }}/.config/systemd/user/podman-image-prune.timer"
|
||||
register: user_systemd_podman_image_prune_timer_file
|
||||
|
||||
- name: SystemD daemon reload
|
||||
systemd:
|
||||
daemon_reload: true
|
||||
@ -126,8 +120,7 @@
|
||||
when:
|
||||
user_systemd_podman_auto_update_service_file is changed or
|
||||
user_systemd_podman_auto_update_timer_file is changed or
|
||||
user_systemd_podman_image_prune_service_file is changed or
|
||||
user_systemd_podman_image_prune_timer_file is changed
|
||||
user_systemd_podman_image_prune_service_file is changed
|
||||
|
||||
- name: Enable podman auto-update
|
||||
systemd:
|
||||
@ -138,9 +131,8 @@
|
||||
|
||||
- name: Enable podman image prune
|
||||
systemd:
|
||||
name: podman-image-prune.timer
|
||||
name: podman-image-prune.service
|
||||
enabled: yes
|
||||
state: started
|
||||
scope: user
|
||||
|
||||
become_user: "{{ service_user_name }}"
|
||||
|
Loading…
Reference in New Issue
Block a user