Optimized performance by moving multiple similar when includes to own tasks file

This commit is contained in:
2025-08-11 13:15:31 +02:00
parent 6318611931
commit 1ba50397db
41 changed files with 616 additions and 733 deletions

View File

@@ -1,32 +1,4 @@
- name: "start sys-bkp-docker-2-loc-everything.infinito.service"
systemd:
name: sys-bkp-docker-2-loc-everything.infinito.service
state: started
when:
- run_once_update_docker is not defined
- mode_backup | bool
- name: create {{update_docker_script}}
template:
src: update-docker.py.j2
dest: "{{update_docker_script}}"
when: run_once_update_docker is not defined
- name: configure update-docker.infinito.service
template:
src: update-docker.service.j2
dest: /etc/systemd/system/update-docker.infinito.service
when: run_once_update_docker is not defined
- name: "restart update-docker.infinito.service"
systemd:
name: update-docker.infinito.service
state: restarted
enabled: yes
daemon_reload: yes
when: run_once_update_docker is not defined
- name: run the update docker tasks once
set_fact:
run_once_update_docker: true
- block:
- include_tasks: 01_core.yml
- include_tasks: utils/run_once.yml
when: run_once_update_docker is not defined