Files
computer-playbook/roles/web-app-nextcloud/tasks/addons/integration_gitlab.yml
kevinveenbirkenbachandClaude Opus 5 5bd3239994 fix(web-app-nextcloud): provision the GitLab OAuth coupling in swarm too
The gate probed the partner with container inspect on a bare name, which only resolves under compose co-location. In swarm GitLab sits on another node, the probe fails, and failed_when: false turns that into a silent skip: the deploy reports success while client_id/client_secret are never written, so the per-user Connect button leads nowhere. Nothing else writes those two values.

Mirrors integration_zammad: resolve node and container id first, wait for the partner endpoint, then run both execs against the resolved ids. Gate on IS_STACK_HOST like every other addon. The include had to become relative, or the stack-host lint cannot see the gate through a templated path.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-08 10:15:07 +02:00

30 lines
1.0 KiB
YAML

---
- name: 🔍 Resolve GitLab integration provisioning facts
set_fact:
nextcloud_gl_nc_base_url: "{{ lookup('tls', 'web-app-nextcloud', 'url.base') | regex_replace('/$', '') }}"
changed_when: false
- name: 📖 Read persisted integration_gitlab OAuth client id
shell: >
{{ NEXTCLOUD_DOCKER_EXEC_OCC }} config:app:get integration_gitlab client_id
register: nextcloud_gl_client_id_current
changed_when: false
failed_when: false
- name: 📖 Read persisted integration_gitlab OAuth client secret
shell: >
{{ NEXTCLOUD_DOCKER_EXEC_OCC }} config:app:get integration_gitlab client_secret
register: nextcloud_gl_client_secret_current
changed_when: false
failed_when: false
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
- name: 🔧 Provision the GitLab <-> Nextcloud OAuth coupling
include_tasks: integration_gitlab_provision.yml
when: >-
IS_STACK_HOST | bool
and (
(nextcloud_gl_client_id_current.stdout | trim) | length == 0
or (nextcloud_gl_client_secret_current.stdout | trim) | length == 0
)