From d55ab2a2d7881e8197d55418207bdb2e95f4d930 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sun, 30 Nov 2025 22:54:32 +0100 Subject: [PATCH] Add WEBSERVER_CORE_APPLICATIONS and merge them into CURRENT_PLAY_APPLICATIONS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- group_vars/all/00_general.yml | 5 +++++ tasks/stages/01_constructor.yml | 12 +++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/group_vars/all/00_general.yml b/group_vars/all/00_general.yml index f945353c..1e5be3e9 100644 --- a/group_vars/all/00_general.yml +++ b/group_vars/all/00_general.yml @@ -105,3 +105,8 @@ RECAPTCHA_ENABLED: "{{ (CAPTCHA.RECAPTCHA.KEY | default('') | length > 0) HCAPTCHA_ENABLED: "{{ (CAPTCHA.HCAPTCHA.KEY | default('') | length > 0) and (CAPTCHA.HCAPTCHA.SECRET | default('') | length > 0) }}" + +# Applications which are allways required +WEBSERVER_CORE_APPLICATIONS: + - web-svc-logout + - web-svc-cdn \ No newline at end of file diff --git a/tasks/stages/01_constructor.yml b/tasks/stages/01_constructor.yml index 1a82d8d9..7349ec1e 100644 --- a/tasks/stages/01_constructor.yml +++ b/tasks/stages/01_constructor.yml @@ -37,9 +37,15 @@ - name: Merge current play applications set_fact: CURRENT_PLAY_APPLICATIONS: >- - {{ - applications | - applications_if_group_and_deps(group_names) + {{ + applications + | applications_if_group_and_deps(group_names) + | combine( + applications + | dict2items + | selectattr('key', 'in', WEBSERVER_CORE_APPLICATIONS) + | items2dict + ) }} no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"