Add WEBSERVER_CORE_APPLICATIONS and merge them into CURRENT_PLAY_APPLICATIONS

Refactored constructor logic to always include core webserver applications (web-svc-logout, web-svc-cdn) by using a dict2items → selectattr → items2dict merge pipeline.

Conversation reference: https://chatgpt.com/share/692cbd03-19d8-800f-a8a8-f42d73481a0d
This commit is contained in:
2025-11-30 22:54:32 +01:00
parent f57ccb2dd7
commit d55ab2a2d7
2 changed files with 14 additions and 3 deletions

View File

@@ -105,3 +105,8 @@ RECAPTCHA_ENABLED: "{{ (CAPTCHA.RECAPTCHA.KEY | default('') | length > 0)
HCAPTCHA_ENABLED: "{{ (CAPTCHA.HCAPTCHA.KEY | default('') | length > 0) HCAPTCHA_ENABLED: "{{ (CAPTCHA.HCAPTCHA.KEY | default('') | length > 0)
and and
(CAPTCHA.HCAPTCHA.SECRET | default('') | length > 0) }}" (CAPTCHA.HCAPTCHA.SECRET | default('') | length > 0) }}"
# Applications which are allways required
WEBSERVER_CORE_APPLICATIONS:
- web-svc-logout
- web-svc-cdn

View File

@@ -37,9 +37,15 @@
- name: Merge current play applications - name: Merge current play applications
set_fact: set_fact:
CURRENT_PLAY_APPLICATIONS: >- CURRENT_PLAY_APPLICATIONS: >-
{{ {{
applications | applications
applications_if_group_and_deps(group_names) | applications_if_group_and_deps(group_names)
| combine(
applications
| dict2items
| selectattr('key', 'in', WEBSERVER_CORE_APPLICATIONS)
| items2dict
)
}} }}
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}" no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"