mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
A handler name was doing two jobs at once: the line an operator reads in the
play output, and the identifier a `notify:` binds to. The two pull in opposite
directions -- the log wants "restart the SSH service, with diagnostics", the
binding wants a token that survives quoting, YAML flow style and a shell
round-trip -- and a name that changes for readability silently changes which
handler runs.
Every handler that a notify reached by name now carries a `listen:` with that
exact wording, so the binding is explicit before anything is renamed. The
topics themselves become identifiers: `compose up` reads `compose-up`,
`Restart NFS ganesha` reads `restart-nfs-ganesha`, 22 of them across both
sides of every notify. Where the topic is assembled at runtime, both branches
moved together: the conditional in sys-service carries two literals, and the
LDAP renderer interpolates `import-{{ folder }}-ldif-files`, which is what
makes those handlers reachable at all.
Freed from the binding, the names take the emoji prefix every other task line
already has.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
52 lines
1.7 KiB
YAML
52 lines
1.7 KiB
YAML
---
|
|
# nocheck: run-once — per-application role: every invocation must (re)apply CDN dirs, inj-*, body_filter.lua for the current `application_id`.
|
|
- name: 📂 Include dependency 'sys-svc-webserver-core'
|
|
include_role:
|
|
name: sys-svc-webserver-core
|
|
vars:
|
|
compose_repository_pull: false # Deactivated here to don't inhire this
|
|
|
|
- name: "🔧 Setup CDN directories for '{{ domain }}'"
|
|
include_role:
|
|
name: sys-svc-cdn
|
|
|
|
- name: 🔨 Build injection facts for '{{ domain }}'
|
|
set_fact:
|
|
inj_enabled: "{{ lookup('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: "🟢 Activate logout proxy for '{{ domain }}'"
|
|
include_role:
|
|
name: sys-front-inj-logout
|
|
public: true
|
|
when: inj_enabled.logout
|
|
|
|
- name: "🟢 Activate Dashboard iFrame notifier for '{{ domain }}'"
|
|
include_role:
|
|
name: sys-front-inj-dashboard
|
|
public: true
|
|
when: inj_enabled.dashboard
|
|
|
|
- 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
|
|
|
|
- name: "📄 Render body_filter Lua for '{{ application_id }}'"
|
|
stack_host_template:
|
|
src: body_filter.lua.j2
|
|
dest: "{{ lookup('nginx', 'directories.configuration.lua') }}{{ application_id }}.lua"
|
|
mode: "0644"
|
|
notify: reload-openresty
|