---
# 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