Files
computer-playbook/tasks
kevinveenbirkenbachandClaude Opus 4.7 3c5baa725a fix(constructor): restore []-init base for CURRENT_PLAY_REDIRECT_DOMAINS
CI run 25976825584 surfaced a broad failure cluster (web-svc-{file,
html,legal,asset}, bookwyrm, bridgy-fed, mig, mini-qr) where the
rendered nginx vhost configs contained an un-evaluated Jinja
expression as `server_name`:

  server_name rdr-domains.{{ lookup('env', 'DOMAIN') | default('infinito.localhost', true) }};

nginx parses `server_name rdr-domains.` (line 3, no `;`), hits `{`
on the next line, and aborts with
`directive "server_name" is not terminated by ";"`.

Bisect points at commit 96e6a3daa which switched the initializer for
`CURRENT_PLAY_REDIRECT_DOMAINS` from a literal `[]` (with
`redirect_domain_mappings | default([])` folded in via merge_mapping)
to using `redirect_domain_mappings | default([])` directly as the
base. The role `web-opt-rdr-domains/defaults/main.yml` defaults
`redirect_domain_mappings: "{{ CURRENT_PLAY_REDIRECT_DOMAINS }}"`,
creating a lazy circular reference: in the new shape, Ansible no
longer forces evaluation of `DOMAIN_PRIMARY` (itself a Jinja-deferred
`{{ lookup('env', 'DOMAIN') | default(...) }}`) at this set_fact, and
the deferred body leaks into the downstream `domain_mappings(...)`
filter that builds entries like `rdr-domains.<DOMAIN_PRIMARY>`. Those
literal Jinja strings end up as `domain` for the redirect template
and reach nginx verbatim.

Restore the original `[]` base + `merge_mapping(redirect_domain_mappings | default([]), 'source')`
pattern. Functionally identical to the pre-96e6a3daa state for this
set_fact; the role-local redirects added by that commit
(web-svc-{asset,css}) stay in place.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 12:50:34 +02:00
..

Cross-role tasks

This folder contains the cross role tasks