fix(domain-filters): support dependency expansion via seed param

- Added missing 'Iterable' import in 'canonical_domains_map' to avoid NameError.
- Introduced 'seed' parameter so the filter can start traversal from current play apps
  while still emitting canonical domains for discovered dependencies (e.g. web-svc-collabora).
- Updated 01_constructor.yml to pass full 'applications' and a clean 'seed' list
  (using dict2items → key) instead of '.keys()' method calls, fixing integration
  test error: 'reference to application keys is invalid'.

This resolves issues where collabora domains were missing and integration tests failed.

Ref: https://chatgpt.com/share/68a51f9b-3924-800f-a41b-803d8dd10397
This commit is contained in:
2025-08-20 03:07:14 +02:00
parent b867a52471
commit 6d70f78989
2 changed files with 17 additions and 8 deletions

View File

@@ -41,10 +41,16 @@
- name: Merge current play domain definitions
set_fact:
current_play_domains: >-
{{ current_play_applications |
canonical_domains_map(PRIMARY_DOMAIN) |
combine(domains | default({}, true), recursive=True)
current_play_domains: >-
{{
applications
| canonical_domains_map(
PRIMARY_DOMAIN,
recursive=True,
roles_base_dir=([ playbook_dir, 'roles' ] | path_join),
seed=(current_play_applications | dict2items | map(attribute='key') | list)
)
| combine(domains | default({}, true), recursive=True)
}}
- name: Merge domain definitions for all domains