Normalized run_once_, made openresty handlers without when aviable and forced flush in run_once when blocks to avoid handlers with when conditions

This commit is contained in:
2025-08-08 15:32:26 +02:00
parent e675aa5886
commit c7b25ed093
58 changed files with 410 additions and 293 deletions

View File

@@ -4,29 +4,29 @@
- lsof
- python-psutil
state: present
when: run_once_cleanup_backups_service is not defined
when: run_once_sys_cln_bkps_service is not defined
- name: "create {{cleanup_backups_directory}}"
file:
path: "{{cleanup_backups_directory}}"
state: directory
mode: 0755
when: run_once_cleanup_backups_service is not defined
when: run_once_sys_cln_bkps_service is not defined
- name: create sys-cln-backups.py
copy:
src: "sys-cln-backups.py"
dest: "{{cleanup_backups_directory}}sys-cln-backups.py"
when: run_once_cleanup_backups_service is not defined
when: run_once_sys_cln_bkps_service is not defined
- name: create sys-cln-backups.infinito.service
template:
src: "sys-cln-backups.service.j2"
dest: "/etc/systemd/system/sys-cln-backups.infinito.service"
notify: reload sys-cln-backups.infinito.service
when: run_once_cleanup_backups_service is not defined
when: run_once_sys_cln_bkps_service is not defined
- name: run the cleanup_backups_service tasks once
set_fact:
run_once_cleanup_backups_service: true
when: run_once_cleanup_backups_service is not defined
run_once_sys_cln_bkps_service: true
when: run_once_sys_cln_bkps_service is not defined