mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Reactivated keycloak docker and webserver tasks and implemented correct logic for element and synapse redirect handling
This commit is contained in:
@@ -29,6 +29,23 @@ def _stable_dedup(items: Sequence[str]) -> list[str]:
|
||||
out.append(x)
|
||||
return out
|
||||
|
||||
def _iter_domains(v) -> Iterable[str]:
|
||||
"""Yield domains from str | list/tuple[str] | dict[*, str|list|tuple]."""
|
||||
if v is None:
|
||||
return
|
||||
if isinstance(v, str):
|
||||
yield v
|
||||
elif isinstance(v, dict):
|
||||
for val in v.values():
|
||||
yield from _iter_domains(val)
|
||||
elif isinstance(v, (list, tuple)):
|
||||
for val in v:
|
||||
yield from _iter_domains(val)
|
||||
else:
|
||||
raise AnsibleFilterError(
|
||||
"redirect_uris: domain_value must be str, list/tuple[str], or dict mapping to those"
|
||||
)
|
||||
|
||||
def redirect_uris(domains: dict,
|
||||
applications: dict,
|
||||
web_protocol: str = "https",
|
||||
@@ -60,7 +77,7 @@ def redirect_uris(domains: dict,
|
||||
continue
|
||||
|
||||
# Normalize to iterable of domains
|
||||
doms = [domain_value] if isinstance(domain_value, str) else list(domain_value or [])
|
||||
doms = list(_iter_domains(domain_value))
|
||||
|
||||
for d in doms:
|
||||
# Use get_url() to produce "<proto>://<domain>"
|
||||
|
@@ -1,10 +1,10 @@
|
||||
---
|
||||
#- name: "create import files for {{application_id}}"
|
||||
# include_tasks: 01_import.yml
|
||||
#
|
||||
#- name: "load docker, db and proxy for {{application_id}}"
|
||||
# include_role:
|
||||
# name: cmp-db-docker-proxy
|
||||
- name: "create import files for {{application_id}}"
|
||||
include_tasks: 01_import.yml
|
||||
|
||||
- name: "load docker, db and proxy for {{application_id}}"
|
||||
include_role:
|
||||
name: cmp-db-docker-proxy
|
||||
|
||||
- name: "Apply client redirects without realm import"
|
||||
include_tasks: 02_update_client_redirects.yml
|
||||
|
Reference in New Issue
Block a user