Optimized docker update

This commit is contained in:
Kevin Veen-Birkenbach 2023-11-16 15:18:11 +01:00
parent 41c1151f5a
commit 8d04397b91
3 changed files with 14 additions and 19 deletions

View File

@ -1,12 +0,0 @@
- name: "reload disc-space-check.service"
systemd:
name: disc-space-check.service
state: reloaded
enabled: yes
daemon_reload: yes
- name: "restart disc-space-check.timer"
systemd:
name: disc-space-check.timer
state: restarted
enabled: yes
daemon_reload: yes

View File

@ -1,9 +1,16 @@
- name: configure docker-volume-backup-cleanup.service
template:
src: docker-volume-backup-cleanup.service.j2
dest: /etc/systemd/system/docker-volume-backup-cleanup.service
- name: create {{update_docker_script}} - name: create {{update_docker_script}}
copy: copy:
src: update-docker.py src: update-docker.py
dest: "{{update_docker_script}}" dest: "{{update_docker_script}}"
- name: configure update-docker.service
template:
src: update-docker.service
dest: /etc/systemd/system/update-docker.service
- name: "reload update-docker.service"
systemd:
name: update-docker.service
state: reloaded
enabled: yes
daemon_reload: yes

View File

@ -4,4 +4,4 @@ OnFailure=systemd-notifier@%n.service
[Service] [Service]
Type=oneshot Type=oneshot
ExecStart=/bin/sh -c '/usr/bin/python {{update_docker_script}} {{docker_volume_backup_cleanup_trigger_directory}}' ExecStart=/bin/sh -c '/usr/bin/python {{update_docker_script}} {{path_docker_compose_files}}'