From ea46bf5fde07772e2c8e5e565952057c9839850d Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Mon, 14 Sep 2026 17:34:23 +0200 Subject: [PATCH] refactor(discourse): drop the plugin repository vars nothing reads DISCOURSE_LDAP_AUTH_PLUGIN_REPOSITORY and DISCOURSE_LDAP_AUTH_PLUGIN_REF date from fd22d34559, when every role mirrored its git URL into a per-role REPOSITORY/REF pair. 84a4b04f0 pointed 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) --- roles/web-app-discourse/vars/main.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/roles/web-app-discourse/vars/main.yml b/roles/web-app-discourse/vars/main.yml index e56af0c86f..8e423d3f92 100644 --- a/roles/web-app-discourse/vars/main.yml +++ b/roles/web-app-discourse/vars/main.yml @@ -18,8 +18,6 @@ DISCOURSE_REDIS_PASSWORD: "{{ lookup('engine', 'redis', application_id, 'passwor 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_LDAP_AUTH_PLUGIN_REPOSITORY: "{{ lookup('config', application_id, 'addons.discourse-ldap-auth.config.repository') }}" -DISCOURSE_LDAP_AUTH_PLUGIN_REF: "{{ lookup('config', application_id, 'addons.discourse-ldap-auth.config.ref') }}" DISCOURSE_DATABASE: "{{ lookup('database', application_id ) }}" DISCOURSE_DATABASE_TYPE: "{{ DISCOURSE_DATABASE.type }}"