mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
meta/schema.yml became meta/secrets.yml, but its content still landed at
applications.<app>.credentials — the one meta file whose payload did not sit
under a root named after the file. Every other topic obeys that rule:
meta/volumes.yml goes to volumes, meta/rbac.yml to rbac. Credentials now go to
secrets.credentials.
The path exists exactly once, in utils/manager/credential_key.py, and
OVERRIDE_SECTION is derived from its two segments rather than spelled beside
them, so the dotted form used by --set and the nested form used by the
inventory cannot drift. Six consumers read it: the loader, the generator, the
CLI override parser, the two emit helpers, and the four lookup validators.
--set now accepts exactly one key shape,
applications.<app>.secrets.credentials.<key>. The three short forms are
rejected instead of guessed at: the same short key names different credentials
on different apps. That also retired primary_app_id, which only existed to
disambiguate them.
Three defects surfaced while wiring this up. _apply_one_role_schema still wrote
to the old root, so an app's own credentials would have moved while its
providers' stayed behind. web-app-pgadmin reads through
lookup('applications', ...).credentials.<key>, an access path no regex over
lookup('config', ...) could see, and would have deployed with an empty postgres
password. And _META_NON_GENERIC_TOPICS still listed 'schema' — a bare topic
name, invisible to any path search — so the generic file-root loop assigned the
raw schema under secrets and the follow-up write landed inside the cached
document, truncating keycloak's four credentials to one for every later
reader.
tests/integration/ansible/lookups/config/test_credentials_roundtrip.py pins both
directions of the seam and the cache invariant that last defect broke.
Existing inventories still carry the pre-rename root; migrating them is
deliberately out of scope here.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
47 lines
1.6 KiB
Django/Jinja
47 lines
1.6 KiB
Django/Jinja
{% include 'roles/sys-svc-container/templates/env.j2' %}
|
|
|
|
TAIGA_SITES_SCHEME={{ lookup('tls', application_id, 'protocols.web') }}
|
|
TAIGA_SITES_DOMAIN={{ lookup('domain',application_id) }}
|
|
SESSION_COOKIE_SECURE={{ TAIGA_COOKIE_SECURE }}
|
|
CSRF_COOKIE_SECURE={{ TAIGA_COOKIE_SECURE }}
|
|
|
|
TAIGA_SUBPATH=
|
|
WEBSOCKETS_SCHEME={{ lookup('tls', application_id, 'protocols.websocket') }}
|
|
|
|
TAIGA_SECRET_KEY={{ lookup('config', application_id, 'secrets.credentials.secret_key') }}
|
|
SECRET_KEY={{ lookup('config', application_id, 'secrets.credentials.secret_key') }}
|
|
|
|
POSTGRES_USER={{ lookup('database', application_id, 'username') }}
|
|
POSTGRES_PASSWORD={{ lookup('database', application_id, 'password') | dotenv_quote }}
|
|
POSTGRES_DB={{ lookup('database', application_id, 'name') }}
|
|
POSTGRES_HOST={{ lookup('database', application_id, 'host') }}
|
|
|
|
{% set email = lookup('email', application_id) %}
|
|
{% if email.enabled | bool %}
|
|
EMAIL_BACKEND={{ TAIGA_EMAIL_BACKEND }}
|
|
EMAIL_HOST={{ email.host }}
|
|
EMAIL_PORT={{ email.port }}
|
|
EMAIL_HOST_USER={{ email.username }}
|
|
EMAIL_HOST_PASSWORD={{ email.password | dotenv_quote }}
|
|
EMAIL_DEFAULT_FROM={{ email['from'] }}
|
|
DEFAULT_FROM_EMAIL={{ email['from'] }}
|
|
|
|
EMAIL_USE_TLS={{ email.tls | capitalize }}
|
|
EMAIL_USE_SSL={{ 'False' if email.start_tls else 'True' }}
|
|
{% endif %}
|
|
|
|
RABBITMQ_USER=taiga
|
|
RABBITMQ_PASS=taiga
|
|
RABBITMQ_VHOST=taiga
|
|
TAIGA_EVENTS_RABBITMQ_HOST={{ TAIGA_EVENTS_RABBITMQ_SERVICE }}
|
|
|
|
RABBITMQ_DEFAULT_USER=taiga
|
|
RABBITMQ_DEFAULT_PASS=taiga
|
|
RABBITMQ_DEFAULT_VHOST=taiga
|
|
RABBITMQ_ERLANG_COOKIE=secret-erlang-cookie
|
|
|
|
ATTACHMENTS_MAX_AG=360
|
|
MAX_AGE=360
|
|
|
|
ENABLE_TELEMETRY=False
|