Files
Kamino/roles/pihole/tasks/merge-defaults.yml
T
Defame1297 910d79768a
Build / build (pull_request) Successful in 27s
Molecule / molecule (pull_request) Failing after 1m2s
Lint / lint (pull_request) Successful in 1m52s
fix(pihole): run every fact-only task whatever tags are skipped
The installed check carried only updates-only and the merge kept its own
default tag, so skipping either left a fact undefined that untagged tasks
read. Both now run under always alone, and the README Tags section no
longer names updates-only, which selected nothing else.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-25 19:09:39 +00:00

24 lines
1.1 KiB
YAML

---
# "pihole_overrides" is only read here: the merged result goes into the fact
# "__pihole_effective", so the input is never overwritten and every run recomputes the merge.
# https://docs.ansible.com/ansible/latest/collections/ansible/builtin/combine_filter.html
- name: Merge overrides over the default variable
ansible.builtin.set_fact:
__pihole_effective: "{{ pihole_default | combine(pihole_overrides | default({}), recursive=True) }}"
# the merged settings hold the web password
no_log: true
# the web password, app password and TOTP secret are masked so the dump is
# safe to paste into an issue or leave in CI logs
- name: Inspect the merged settings (secrets masked)
ansible.builtin.debug:
msg: "{{ __pihole_effective | combine({'config': {'webserver': {'api': __pihole_masked_secrets}}}, recursive=True) }}"
vars:
__pihole_masked_secrets: {password: <masked>, app_password: <masked>, totp_secret: <masked>}
when: pihole_testing | bool
- name: Pausing to highlight merge result
ansible.builtin.wait_for:
timeout: "{{ pihole_testing_timeout }}"
when: pihole_testing | bool