mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
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>
30 lines
1.0 KiB
YAML
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
|
|
)
|