mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
An untyped inspect searches every docker object kind, and a role's overlay network carries the same entity name as its main container, so the call can resolve the network and report a missing State key instead of naming the container. That is how the openresty assert died on every swarm job of run 30709070050. Extend container-exec-resolver to cover inspect, stripping raw markers and quoted spans first so the flag walker survives Go template format strings. Add container-inspect-type, scoped to roles/ because the collision follows the entity naming convention and the outer act namespace carries no role networks. Sweep 40 call sites; suppress the delegate_to-resolved CIDs and the compose co-location probes with a stated reason. Move the five container rules into tests/lint/ansible/shell/container/ and drop the container_ prefix from their filenames. Register both markers in the suppression docs, where the resolver marker was missing entirely. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
27 lines
1.8 KiB
YAML
27 lines
1.8 KiB
YAML
---
|
|
# Exception logic: genuine bidirectional OAuth 2.0 coupling the generic config SPOT cannot do.
|
|
# integration_suitecrm drives the SuiteCRM OAuth2 password grant and only works once a
|
|
# "password" client is registered on SuiteCRM; its client_id/client_secret plus the partner
|
|
# instance URL must then be linked into the connector's admin settings (oauth_instance_url,
|
|
# client_id, client_secret), none of which the generic config block sets. The client secret is
|
|
# derived deterministically so provisioning stays idempotent across re-runs on both ends.
|
|
- name: 🔍 Resolve SuiteCRM partner coupling facts
|
|
set_fact:
|
|
nextcloud_crm_container: "{{ lookup('config', 'web-app-suitecrm', 'services.suitecrm.name') }}"
|
|
nextcloud_crm_instance_dir: "{{ lookup('container', 'web-app-suitecrm', 'directories.instance') }}"
|
|
nextcloud_crm_base_url: "{{ lookup('tls', 'web-app-suitecrm', 'url.base') | trim }}"
|
|
nextcloud_crm_client_name: "Nextcloud ({{ lookup('domain', 'web-app-nextcloud') }})"
|
|
nextcloud_crm_client_secret: "{{ ('integration_suitecrm' ~ lookup('users', 'administrator').password) | hash('sha256') }}"
|
|
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
|
|
|
- name: 🔍 Probe whether the SuiteCRM partner container is running
|
|
command: > # nocheck: container-exec-resolver this IS the bare-name partner probe gate, compose co-location
|
|
container inspect --type container -f '{% raw %}{{.State.Running}}{% endraw %}' {{ nextcloud_crm_container }}
|
|
register: integration_suitecrm_partner_running
|
|
changed_when: false
|
|
failed_when: false
|
|
|
|
- name: 🔧 Provision the bidirectional SuiteCRM <-> Nextcloud OAuth coupling
|
|
include_tasks: "{{ [role_path, 'tasks/addons/integration_suitecrm_provision.yml'] | path_join }}"
|
|
when: (integration_suitecrm_partner_running.stdout | trim) == 'true'
|