integration_gitlab.ymlΒΆ

---
- name: πŸ” Resolve GitLab integration provisioning facts
  set_fact:
    nextcloud_gl_nc_base_url: "{{ lookup('tls', 'web-app-nextcloud', 'url.origin') }}"
  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: nextcloud_gl_client_id_current.rc not in [0, 1]

- 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: nextcloud_gl_client_secret_current.rc not in [0, 1]
  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
    )