Files
computer-playbook/roles/web-app-pretix/vars/main.yml
kevinveenbirkenbachandClaude Opus 5 30d8671c39 refactor(mcp): let the sidecar entry be the switch, not the topic
Thirteen of sixteen MCP sidecar entries carried no enabled at all, so
collect_role_resources fell back to _looks_like_container and billed every
one of them as running. Three roles already gated theirs on mcp.enabled;
the rest now do the same, gitea twice because it is the only role with a
vendor container behind the adapter.

The fifteen adapter roles then read services.<key>.enabled instead of
mcp.enabled, so the compose block and the task gates follow the services
entry rather than running beside it on a second path. The six plugin and
native roles keep reading the topic: they ship no sidecar entry to point at.

The three-level resolution is not new. KEYCLOAK_LOGOUT_PANEL_ENABLED has
the same shape and depth and gates a task the same way, and the same value
reaches JAVASCRIPT_SERVICE_ENABLED, where service-gating.js throws on
anything but "true" or "false" — an unresolved chain would have been
killing keycloak's Playwright run since 575a5a87ac.

This does not change what the resource model counts: _is_enabled reads the
unrendered Jinja and still treats it as on. What it buys is one switch
instead of two, and a declaration that matches it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-01 17:42:33 +02:00

51 lines
2.9 KiB
YAML

---
application_id: "web-app-pretix"
container_hostname: "{{ lookup('container_hostname', application_id) }}"
PRETIX_URL: "{{ lookup('tls', application_id, 'url.base') }}"
PRETIX_HOSTNAME: "{{ container_hostname }}"
PRETIX_OIDC_ENABLED: "{{ lookup('config', application_id, 'services.sso.enabled') }}"
PRETIX_OIDC_LABEL: "{{ OIDC.BUTTON_TEXT }}"
PRETIX_OIDC_CLIENT_ID: "{{ OIDC.CLIENT.ID }}"
PRETIX_OIDC_CLIENT_SECRET: "{{ OIDC.CLIENT.SECRET }}"
PRETIX_OIDC_ISSUER: "{{ OIDC.CLIENT.ISSUER_URL }}"
PRETIX_OIDC_AUTH_URL: "{{ OIDC.CLIENT.AUTHORIZE_URL }}"
PRETIX_OIDC_TOKEN_URL: "{{ OIDC.CLIENT.TOKEN_URL }}"
PRETIX_OIDC_USERINFO_URL: "{{ OIDC.CLIENT.USER_INFO_URL }}"
PRETIX_OIDC_LOGOUT_URL: "{{ OIDC.CLIENT.LOGOUT_URL }}"
PRETIX_OIDC_JWKS_URL: "{{ OIDC.CLIENT.CERTS }}"
PRETIX_OIDC_SCOPES: "openid,email,profile"
PRETIX_OIDC_UNIQUE_ATTRIBUTE: "{{ OIDC.ATTRIBUTES.USERNAME }}"
PRETIX_OIDC_PLUGIN_VERSION: "{{ lookup('config', application_id, 'addons.pretix-oidc.version') }}"
PRETIX_REDIS_ENABLED: "{{ lookup('config', application_id, 'services.redis.enabled') }}"
PRETIX_REDIS_CACHE_DB: 1
PRETIX_REDIS_BROKER_DB: 0
PRETIX_REDIS_RESULT_DB: 2
PRETIX_IMAGE: "{{ lookup('config', application_id, 'services.pretix.image') }}"
PRETIX_VERSION: "{{ lookup('config', application_id, 'services.pretix.version') }}"
PRETIX_CONTAINER: "{{ lookup('config', application_id, 'services.pretix.name') }}"
PRETIX_MCP_ENABLED: "{{ lookup('config', application_id, 'services.pretixmcp.enabled') | bool }}"
PRETIX_MCP_SERVICE_KEY: "pretixmcp"
PRETIX_MCP_CONTAINER: "{{ lookup('config', application_id, 'services.pretixmcp.name') }}"
PRETIX_MCP_PORT: "{{ lookup('config', application_id, 'services.pretixmcp.ports.internal.http') }}"
PRETIX_MCP_BEARER: "{{ lookup('config', application_id, 'secrets.credentials.mcp_bearer') }}"
PRETIX_MCP_INSTANCE_DIR: "{{ [lookup('container', application_id, 'directories.instance'), 'mcp'] | path_join }}"
PRETIX_MCP_UPSTREAM_HOST: "{{ lookup('config', application_id, 'services.pretix.name') }}"
PRETIX_MCP_UPSTREAM_PORT: "{{ lookup('config', application_id, 'services.pretix.ports.internal.http') }}"
PRETIX_MCP_UPSTREAM_URL: "http://{{ PRETIX_MCP_UPSTREAM_HOST }}:{{ PRETIX_MCP_UPSTREAM_PORT }}"
PRETIX_MCP_CONTRACT:
provider: "{{ application_id }}"
upstream_url: "{{ PRETIX_MCP_UPSTREAM_URL }}"
auth_subject: "{{ lookup('config', application_id, 'mcp.auth_subject') }}"
mutating_tools_enabled: "{{ lookup('config', application_id, 'mcp.tools.mutating_tools_enabled') | bool }}"
tools: "{{ lookup('file', 'mcp/tools.json') | from_json }}"
limits: "{{ lookup('config', application_id, 'mcp.limits') }}"
schema_sha256: "{{ lookup('config', application_id, 'mcp.tools.schema_sha256') }}"
PRETIX_MCP_UPSTREAM_KEY: "{{ lookup('config', application_id, 'secrets.credentials.mcp_upstream_token') }}"
PRETIX_MCP_UPSTREAM_TEAM: "mcp-readonly"
PRETIX_MCP_UPSTREAM_AUTH_HEADER: "Authorization"
PRETIX_MCP_UPSTREAM_AUTH_FORMAT: "Token {key}"