mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 02:54:26 +00:00
DISCOURSE_LDAP_AUTH_PLUGIN_REPOSITORY and DISCOURSE_LDAP_AUTH_PLUGIN_REF date fromfd22d34559, when every role mirrored its git URL into a per-role REPOSITORY/REF pair.84a4b04f0pointed the clone loop in config.yml.j2 at plugin_config.config.repository and plugin_config.config.ref instead, reading the addon declaration directly, and left the mirror without a reader. They are not merely noise. Both are unconditional top-level vars whose lookup('config', ...) carries no fourth argument and is therefore strict, and both address a path that exists only while this one addon keeps this one id. Renaming or removing discourse-ldap-auth would have failed every Discourse task at resolution time over a value no caller wanted. The surviving LDAP path is untouched: DISCOURSE_LDAP_ENABLED reads services.ldap.enabled, and stack_host/02_credentials.yml takes the site settings through DISCOURSE_PLUGINS['discourse-ldap-auth'].config.site_settings. A tree-wide grep for DISCOURSE_LDAP_AUTH_PLUGIN now returns nothing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
53 lines
3.5 KiB
YAML
53 lines
3.5 KiB
YAML
---
|
|
application_id: "web-app-discourse"
|
|
entity_name: "{{ application_id | get_entity_name }}"
|
|
|
|
database_password: "{{ lookup('config', application_id, 'secrets.credentials.database_password') }}" # nocheck: lookup-config-path
|
|
|
|
DISCOURSE_CONTAINER: "{{ entity_name }}"
|
|
DISCOURSE_NETWORK: "{{ application_id | get_entity_name }}"
|
|
DISCOURSE_VOLUME: "{{ lookup('volume', application_id, 'data').name }}"
|
|
DISCOURSE_PLUGINS: "{{ lookup('config', application_id, 'addons') }}"
|
|
DISCOURSE_PG_NETWORK: "{{ ('svc-db-' ~ DISCOURSE_DATABASE_TYPE) | get_entity_name }}"
|
|
DISCOURSE_REDIS_NETWORK: "{{ 'svc-db-redis' | get_entity_name }}"
|
|
DISCOURSE_WEB_NETWORK: "{{ 'svc-prx-openresty' | get_entity_name }}"
|
|
DISCOURSE_REDIS_SHARED: "{{ not (lookup('engine', 'redis', application_id, 'local') | bool) }}"
|
|
DISCOURSE_REDIS_HOST: "{{ lookup('engine', 'redis', application_id, 'host') }}"
|
|
DISCOURSE_REDIS_PORT: "{{ lookup('engine', 'redis', application_id, 'port') }}"
|
|
DISCOURSE_REDIS_PASSWORD: "{{ lookup('engine', 'redis', application_id, 'password') }}"
|
|
DISCOURSE_REPOSITORY_URL: "{{ lookup('config', application_id, 'services.' ~ entity_name ~ '.repository') }}"
|
|
DISCOURSE_REF: "{{ lookup('config', application_id, 'services.' ~ entity_name ~ '.ref') }}"
|
|
DISCOURSE_VERSION: "{{ lookup('config', application_id, 'services.' ~ entity_name ~ '.application.ref') }}"
|
|
|
|
DISCOURSE_DATABASE: "{{ lookup('database', application_id ) }}"
|
|
DISCOURSE_DATABASE_TYPE: "{{ DISCOURSE_DATABASE.type }}"
|
|
DISCOURSE_DATABASE_CONTAINER: "{{ DISCOURSE_DATABASE.container }}" # nocheck: container-var-name-lookup references the shared database container, not this role's service
|
|
DISCOURSE_DATABASE_IS_SHARED: "{{ DISCOURSE_DATABASE.shared }}"
|
|
|
|
DISCOURSE_REPOSITORY_DIR: "{{ lookup('container', application_id, 'directories.services') }}{{ lookup('config', application_id, 'services.discourse.repository') }}/"
|
|
DISCOURSE_CONTAINERS_DIR: "{{ [ DISCOURSE_REPOSITORY_DIR, 'containers' ] | path_join }}"
|
|
|
|
DISCOURSE_APPLICATION_YML_DEST: "{{ [ DISCOURSE_CONTAINERS_DIR, DISCOURSE_CONTAINER ~ '.yml' ] | path_join }}"
|
|
|
|
DISCOURSE_BOOTSTRAP_DIGEST_DEST: "{{ [ DISCOURSE_CONTAINERS_DIR, DISCOURSE_CONTAINER ~ '.bootstrap.sha256' ] | path_join }}"
|
|
|
|
DISCOURSE_LDAP_ENABLED: "{{ lookup('config', application_id, 'services.ldap.enabled') }}"
|
|
|
|
DISCOURSE_LITELLM_ENABLED: "{{ lookup('config', application_id, 'services.litellm.enabled') | bool }}"
|
|
DISCOURSE_LITELLM_API_KEY: "{{ lookup('config', application_id, 'secrets.credentials.litellm_api_key') }}"
|
|
DISCOURSE_LITELLM_NETWORK: "{{ 'svc-ai-litellm' | get_entity_name }}"
|
|
DISCOURSE_LITELLM_HOST: "{{ LITELLM_OPENAI_BASE_LOCAL_URL | urlsplit('hostname') }}"
|
|
DISCOURSE_LITELLM_CHAT_ENDPOINT: "{{ LITELLM_OPENAI_BASE_LOCAL_URL }}/chat/completions"
|
|
DISCOURSE_AI_LLM_DISPLAY_NAME: "{{ lookup('config', application_id, 'addons.discourse-ai.config.display_name') }}"
|
|
DISCOURSE_AI_MAX_PROMPT_TOKENS: "{{ lookup('config', application_id, 'addons.discourse-ai.config.max_prompt_tokens') | int }}"
|
|
|
|
DISCOURSE_LOCAL: "C.{{ HOST_CS }}"
|
|
|
|
DISCOURSE_OIDC_ENABLED: "{{ lookup('config', application_id, 'services.sso.enabled') }}"
|
|
DISCOURSE_OIDC_LOGOUT_REDIRECT_URL: "{{ lookup('tls', 'web-svc-logout', 'url.base') }}"
|
|
DISCOURSE_LOCAL_LOGIN_ENABLED: "{{ lookup('config', application_id, 'services.discourse.local_login_enabled') }}"
|
|
|
|
DISCOURSE_TLS_ENABLED: "{{ lookup('tls', application_id, 'enabled') | bool }}"
|
|
DISCOURSE_TLS_SELFSIGNED: "{{ lookup('tls', application_id, 'mode') == 'self_signed' }}"
|
|
DISCOURSE_TLS_SELFSIGNED_ENABLED: "{{ ( DISCOURSE_TLS_ENABLED | bool ) and ( DISCOURSE_TLS_SELFSIGNED | bool ) }}"
|