mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
The db:migrate and settings tasks, and the nextcloud to openproject OAuth provisioning, ran container exec into the openproject web container from the manager. In swarm the web replica is scheduled on a worker, so the manager-resolved container id is not local and the exec fails. Resolve the web service's hosting node and node-local container id via resolve_host_cid and delegate every exec to that node, matching the pattern the role's own 03_admin.yml and the mattermost integration already use. The nextcloud running probe is dropped in favour of the convergence wait. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
42 lines
1.8 KiB
YAML
42 lines
1.8 KiB
YAML
---
|
|
# Exception logic: genuine bidirectional OAuth 2.0 coupling the generic config SPOT cannot do.
|
|
# An OAuth application is registered on the OpenProject side and a Nextcloud OAuth2 client is
|
|
# registered back on the OpenProject storage; the partner-derived client ids/secret are linked
|
|
# into integration_openproject. Re-runs only while Nextcloud is not yet coupled.
|
|
- name: 🔍 Resolve expected OpenProject base URL for the integration
|
|
set_fact:
|
|
nextcloud_op_expected_url: "{{ lookup('tls', 'web-app-openproject', 'url.base') | trim }}"
|
|
nextcloud_op_storage_name: "Nextcloud ({{ lookup('domain', 'web-app-nextcloud') }})"
|
|
changed_when: false
|
|
|
|
- name: 📖 Read persisted integration_openproject OpenProject OAuth client id
|
|
shell: >
|
|
{{ NEXTCLOUD_DOCKER_EXEC_OCC }} config:app:get integration_openproject openproject_client_id
|
|
register: nextcloud_op_client_id_current
|
|
changed_when: false
|
|
failed_when: false
|
|
|
|
- name: 📖 Read persisted integration_openproject Nextcloud OAuth client id
|
|
shell: >
|
|
{{ NEXTCLOUD_DOCKER_EXEC_OCC }} config:app:get integration_openproject nc_oauth_client_id
|
|
register: nextcloud_op_nc_client_current
|
|
changed_when: false
|
|
failed_when: false
|
|
|
|
- name: 📖 Read persisted integration_openproject OpenProject OAuth client secret
|
|
shell: >
|
|
{{ NEXTCLOUD_DOCKER_EXEC_OCC }} config:app:get integration_openproject openproject_client_secret
|
|
register: nextcloud_op_client_secret_current
|
|
changed_when: false
|
|
failed_when: false
|
|
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
|
|
|
- name: 🔧 Provision the bidirectional OpenProject <-> Nextcloud OAuth coupling
|
|
include_tasks: integration_openproject_provision.yml
|
|
when: >-
|
|
IS_STACK_HOST | bool
|
|
and (
|
|
(nextcloud_op_client_id_current.stdout | trim) | length == 0
|
|
or (nextcloud_op_nc_client_current.stdout | trim) | length == 0
|
|
)
|