mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-03 16:09:29 +00:00
- Replace legacy utils/run_once.yml with the new helpers utils/once_flag.yml and utils/once_finalize.yml - Introduce utils/compose_up.yml to ensure docker-compose stacks are up and to flush handlers safely without coupling to run-once flags - Migrate all affected roles (desk-*, dev-*, sys-ctl-*, sys-svc-*, web-app-*, web-svc-*, util-*) to the new run-once helpers - Rework sys-svc-msmtp to auto-load Mailu once per deploy, check reachability, and reuse the running stack instead of requiring multiple playbook passes - Adjust web-app-mailu to integrate cert deployment, handler flushing, and run-once handling so Mailu is fully initialized in a single deploy - Improve Matomo, CDN, logout and CSP/health-check related roles to cooperate with the new compose_up / once_* pattern - Simplify alarm/backup/timer/service orchestration (sys-ctl-alm-*, sys-bkp-provider, sys-timer-cln-bkps, etc.) by moving run-once logic into dedicated 01_core.yml files - Update integration tests so utils/once_flag.yml and utils/once_finalize.yml are recognised as valid run-once providers, keeping the global run_once_* guarantees consistent - Align frontend injection and service dependencies so Mastodon- and Mailu-related services can be brought up coherently within a single deployment cycle rather than several iterations
41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
---
|
|
- block:
|
|
- name: Ensure shared root and vendor exist (run once)
|
|
ansible.builtin.file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
owner: "{{ NGINX.USER }}"
|
|
group: "{{ NGINX.USER }}"
|
|
mode: "0755"
|
|
loop: "{{ CDN_DIRS_GLOBAL }}"
|
|
- include_tasks: utils/once_finalize.yml
|
|
when:
|
|
- run_once_sys_svc_cdn is not defined
|
|
|
|
- name: Overwritte CDN handlers with neutral handlers
|
|
ansible.builtin.include_tasks: "{{ [ playbook_dir, 'tasks/utils/load_handlers.yml'] | path_join }}"
|
|
loop:
|
|
- svc-prx-openresty
|
|
- docker-compose
|
|
loop_control:
|
|
label: "{{ item }}"
|
|
vars:
|
|
handler_role_name: "{{ item }}"
|
|
|
|
- name: Ensure CDN directories exist
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
owner: "{{ NGINX.USER }}"
|
|
group: "{{ NGINX.USER }}"
|
|
mode: "0755"
|
|
loop: "{{ cdn_dirs_role }}"
|
|
|
|
- name: Ensure 'latest' symlink points to current release
|
|
file:
|
|
src: "{{ cdn_paths_all.role.release.root }}"
|
|
dest: "{{ [cdn_paths_all.role.root, 'latest'] | path_join }}"
|
|
state: link
|
|
force: true
|
|
when: CDN_VERSION != 'latest'
|