From eedfe83ece8fe95a0536a80d236b7dec8125a2db Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 8 Aug 2025 11:03:43 +0200 Subject: [PATCH] Solved missing redirect bug --- roles/sys-hlth-webserver/templates/sys-hlth-webserver.py.j2 | 2 +- roles/web-app-friendica/vars/main.yml | 3 +++ tasks/stages/01_constructor.yml | 5 ++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/roles/sys-hlth-webserver/templates/sys-hlth-webserver.py.j2 b/roles/sys-hlth-webserver/templates/sys-hlth-webserver.py.j2 index 876f6574..e90ee983 100644 --- a/roles/sys-hlth-webserver/templates/sys-hlth-webserver.py.j2 +++ b/roles/sys-hlth-webserver/templates/sys-hlth-webserver.py.j2 @@ -42,7 +42,7 @@ for filename in os.listdir(config_path): # Prepare the URL and expected status codes url = f"{{ WEB_PROTOCOL }}://{domain}" - redirected_domains = [domain['source'] for domain in {{ current_play_domain_mappings_redirect}}] + redirected_domains = [domain['source'] for domain in {{ redirect_domain_mappings }}] redirected_domains.append("{{domains | get_domain('web-app-mailu')}}") expected_statuses = get_expected_statuses(domain, parts, redirected_domains) diff --git a/roles/web-app-friendica/vars/main.yml b/roles/web-app-friendica/vars/main.yml index 2e9b263e..900a24b7 100644 --- a/roles/web-app-friendica/vars/main.yml +++ b/roles/web-app-friendica/vars/main.yml @@ -1,5 +1,8 @@ +# General application_id: "web-app-friendica" database_type: "mariadb" + +# Friendica Specific friendica_container: "friendica" friendica_no_validation: "{{ applications | get_app_conf(application_id, 'features.oidc', True) }}" # Email validation is not neccessary if OIDC is active friendica_application_base: "/var/www/html" diff --git a/tasks/stages/01_constructor.yml b/tasks/stages/01_constructor.yml index b41025f9..edac2ed3 100644 --- a/tasks/stages/01_constructor.yml +++ b/tasks/stages/01_constructor.yml @@ -42,7 +42,6 @@ canonical_domains_map(primary_domain) | combine(current_play_domains, recursive=True) }} - - name: Merge redirect_domain_mappings set_fact: # The following mapping is necessary to define the exceptions for domains which are created, but which aren't used @@ -54,7 +53,7 @@ - name: Set current play redirect domain mappings set_fact: - current_play_domain_mappings_redirect: >- + redirect_domain_mappings: >- {{ current_play_applications | domain_mappings(primary_domain) | @@ -67,7 +66,7 @@ {{ (current_play_domains | combine( - current_play_domain_mappings_redirect | + redirect_domain_mappings | default([]) | items2dict(key_name='source', value_name='source'), recursive=True )) |