mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
The adapter flush notifies `compose up --force-recreate`, which recreates every service in the project including the Jenkins controller. The contract probe then ran 12 seconds after that recreate, while Jenkins was still booting, so the upstream answered 401 and the probe reported the adapter as refusing its own credential. Extract the readiness wait so it can run twice and repeat it after the flush. Bind the adapter to the controller with service_healthy as well: that is what keeps gitea's sidecar out of this race, and swarm ignores the condition, so the wait carries that mode. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
14 lines
562 B
YAML
14 lines
562 B
YAML
---
|
|
- name: "⏳ Wait until the controller serves requests again"
|
|
ansible.builtin.shell: | # nocheck: container-exec-resolver runtime-resolved CID, delegated to the hosting node
|
|
container exec -i {{ JENKINS_LOCAL_CID | quote }} \
|
|
{{ lookup('timeout', 30) | curl(5, 0) }} -o /dev/null -w '%{http_code}' \
|
|
{{ JENKINS_MCP_READY_URL | quote }}
|
|
register: jenkins_ready_probe
|
|
retries: 60
|
|
delay: 5
|
|
until: jenkins_ready_probe.stdout is match('[234][0-9][0-9]')
|
|
changed_when: false
|
|
delegate_to: "{{ JENKINS_HOST_NODE }}"
|
|
run_once: true
|