Files
computer-playbook/roles/web-app-fusiondirectory/meta/variants.yml
kevinveenbirkenbachandClaude Opus 5 8f6c31056b test(variants): refuse two variants that declare the same override
Eight meta/variants.yml repeated their last entry verbatim. The six svc-* roles
held the same tor.enabled override twice; fusiondirectory and phpldapadmin held
a third entry identical to their second, nocheck comments included.

The matrix plans a row per entry, assigns it its own axes and spends a deploy
job on it, around a hundred minutes here. The repetition is invisible in the
plan table, which lists rows by role#variant, so the two read as different rows
and only their identical embeds and weight betray them.

test_variants_distinct.py compares the parsed payload rather than the file text,
so key order, indentation and comments do not hide a duplicate, and null
normalises to {} because a bare list item and an explicit {} declare the same
no-override entry. A role whose variants are told apart by something outside the
entry opts the file out with `# nocheck: variants-duplicate` and a reason; no
file needs it today.

Every deletion is the trailing entry, so the surviving indices keep their
meaning and nothing is renumbered. The vanishing tokens are svc-db-elasticsearch#1,
svc-db-memcached#1, svc-db-rabbitmq#1, svc-db-redis#1, svc-db-typesense#1,
svc-prx-openresty#1, web-app-fusiondirectory#2 and web-app-phpldapadmin#2;
`git grep` against the commit finds no consumer naming any of them.

Negative control executed: re-adding the redis duplicate fails the lint with
"svc-db-redis: variants #0, #1 declare the same override", removing it passes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-18 16:57:24 +02:00

63 lines
1.8 KiB
YAML

---
# Matrix-deploy variant overrides. `ldap` is pinned in `services.yml`
# (`enabled: true`, `shared: true`) because LDAP IS the storage backend
# for FusionDirectory — every variant inherits it, so the variant blocks
# below don't override it.
# variant 0: OIDC variant (canonical default; oauth2-proxy gate).
- services:
container_backup:
enabled: true
dashboard:
enabled: true
shared: true
email:
enabled: true
shared: true
logout:
enabled: true
shared: true
matomo:
enabled: true
shared: true
sso:
enabled: true
shared: true
prometheus:
enabled: true
shared: true
css:
enabled: true
shared: true
tor:
enabled: true
- services:
container_backup:
enabled: false
shared: false # nocheck: variants-static-override backup shared stays literally true
dashboard:
enabled: false
shared: false # nocheck: variants-static-override backup shared stays literally true
email:
enabled: false
shared: false # nocheck: variants-static-override backup shared stays literally true
logout:
enabled: false
shared: false # nocheck: variants-static-override backup shared stays literally true
matomo:
enabled: false
shared: false # nocheck: variants-static-override backup shared stays literally true
sso:
enabled: false
shared: false # nocheck: variants-static-override backup shared stays literally true
prometheus:
enabled: false
shared: false # nocheck: variants-static-override backup shared stays literally true
css:
enabled: false
shared: false # nocheck: variants-static-override backup shared stays literally true
tor:
enabled: true