General optimations

This commit is contained in:
2025-07-09 10:17:32 +02:00
parent a69b2c9cb2
commit af3767fdfa
72 changed files with 377 additions and 618 deletions

View File

@@ -2,41 +2,41 @@
include_role:
name: pkgmgr-install
vars:
package_name: cln-failed-docker-backups
when: run_once_cleanup_failed_docker_backups is not defined
package_name: "{{ cln_failed_docker_backups_pkg }}"
when: run_once_cln_failed_docker_backups is not defined
- name: Retrieve bkp-docker-to-local path from pkgmgr
command: pkgmgr path cln-failed-docker-backups
- name: "Retrieve {{ cln_failed_docker_backups_pkg }} path from pkgmgr"
command: "pkgmgr path {{ cln_failed_docker_backups_pkg }}"
register: pkgmgr_output
changed_when: false
when: run_once_cleanup_failed_docker_backups is not defined
when: run_once_cln_failed_docker_backups is not defined
- name: Set fact for backup_docker_to_local_cleanup_script
set_fact:
backup_docker_to_local_cleanup_script: "{{ pkgmgr_output.stdout.rstrip('/') ~ '/cln-all.sh' }}"
changed_when: false
when: run_once_cleanup_failed_docker_backups is not defined
when: run_once_cln_failed_docker_backups is not defined
- name: configure cln-failed-docker-backups.cymais.service
template:
src: cln-failed-docker-backups.service.j2
dest: /etc/systemd/system/cln-failed-docker-backups.cymais.service
notify: Reload cln-failed-docker-backups.cymais.service
when: run_once_cleanup_failed_docker_backups is not defined
when: run_once_cln_failed_docker_backups is not defined
- name: set service_name to the name of the current role
- name: "set 'service_name' to '{{ role_name }}'"
set_fact:
service_name: "{{ role_name }}"
when: run_once_cleanup_failed_docker_backups is not defined
when: run_once_cln_failed_docker_backups is not defined
- name: "include role for gen-timer for {{service_name}}"
include_role:
name: gen-timer
vars:
on_calendar: "{{on_calendar_cleanup_failed_docker}}"
when: run_once_cleanup_failed_docker_backups is not defined
when: run_once_cln_failed_docker_backups is not defined
- 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
run_once_cln_failed_docker_backups: true
when: run_once_cln_failed_docker_backups is not defined