mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-10-21 13:36:39 +00:00
- sys-front-inj-all: load web-svc-cdn and web-svc-logout once; reinitialize inj_enabled after services; move run_once block to top; reorder injections. - sys-front-inj-css: move run_once call into 01_core; fix app_style_present default; simplify main. - sys-front-inj-desktop/js/matomo: deactivate per-role run_once blocks; keep utils/run_once where appropriate. - sys-front-inj-logout: switch to files/logout.js + copy; update head_sub mtime lookup; mark set_fact tasks unchanged. - sys-svc-cdn: inline former 01_core tasks into main; ensure shared/vendor dirs and set run_once in guarded block; remove 01_core.yml. Rationale: prevent cascading 'false_condition: run_once_sys_svc_cdn is not defined' skips by setting run-once facts only after the necessary tasks and avoiding parent-scope guards; improves determinism and handler flushing. Conversation: https://chatgpt.com/share/68ecfaa5-94a0-800f-b1b6-2b969074651f
67 lines
1.9 KiB
YAML
67 lines
1.9 KiB
YAML
- block:
|
|
- name: Include dependency 'sys-svc-webserver-core'
|
|
include_role:
|
|
name: sys-svc-webserver-core
|
|
when: run_once_sys_svc_webserver_core is not defined
|
|
- include_tasks: utils/run_once.yml
|
|
when: run_once_sys_front_inj_all is not defined
|
|
|
|
- name: Build inj_enabled
|
|
set_fact:
|
|
inj_enabled: "{{ applications | inj_enabled(application_id, SRV_WEB_INJ_COMP_FEATURES_ALL) }}"
|
|
|
|
- name: "Load CDN for '{{ domain }}'"
|
|
include_role:
|
|
name: web-svc-cdn
|
|
public: false
|
|
when:
|
|
- application_id != 'web-svc-cdn'
|
|
- run_once_web_svc_cdn is not defined
|
|
|
|
- name: Load Logout for '{{ domain }}'
|
|
include_role:
|
|
name: web-svc-logout
|
|
public: false
|
|
when:
|
|
- run_once_web_svc_logout is not defined
|
|
- application_id != 'web-svc-logout'
|
|
- inj_enabled.logout
|
|
|
|
- name: Reinitialize 'inj_enabled' for '{{ domain }}', after loading the required webservices
|
|
set_fact:
|
|
inj_enabled: "{{ applications | inj_enabled(application_id, SRV_WEB_INJ_COMP_FEATURES_ALL) }}"
|
|
inj_head_features: "{{ SRV_WEB_INJ_COMP_FEATURES_ALL | inj_features('head') }}"
|
|
inj_body_features: "{{ SRV_WEB_INJ_COMP_FEATURES_ALL | inj_features('body') }}"
|
|
|
|
- name: "Load CDN Service for '{{ domain }}'"
|
|
include_role:
|
|
name: sys-svc-cdn
|
|
public: true
|
|
|
|
- name: "Activate logout proxy for '{{ domain }}'"
|
|
include_role:
|
|
name: sys-front-inj-logout
|
|
public: true
|
|
when: inj_enabled.logout
|
|
|
|
- name: "Activate Desktop iFrame notifier for '{{ domain }}'"
|
|
include_role:
|
|
name: sys-front-inj-desktop
|
|
public: true
|
|
when: inj_enabled.desktop
|
|
|
|
- name: "Activate Corporate CSS for '{{ domain }}'"
|
|
include_role:
|
|
name: sys-front-inj-css
|
|
when: inj_enabled.css
|
|
|
|
- name: "Activate Matomo Tracking for '{{ domain }}'"
|
|
include_role:
|
|
name: sys-front-inj-matomo
|
|
when: inj_enabled.matomo
|
|
|
|
- name: "Activate Javascript for '{{ domain }}'"
|
|
include_role:
|
|
name: sys-front-inj-javascript
|
|
when: inj_enabled.javascript
|