ready.ymlΒΆ

---
- 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