mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-12-05 17:28:21 +00:00
fix(svc-db-redis): run the readiness checks once on the stack host
The redis wait-until-running + PING checks exec via REDIS_CONTAINER_ADDRESS (resolve-container-id, manager-only). Ungated they ran on every node, so on workers resolve-container-id exits 'must run on a Swarm manager node' and the checks fail (broke svc-bkp-container-2-local). Gate them to the stack host with delegate_to + run_once, mirroring svc-db-postgres. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
0e973338d6
commit
45aa32e397
1 file changed
+4
@@ -13,6 +13,8 @@
|
||||
ansible.builtin.shell: >
|
||||
container inspect --format '{{ "{{.State.Status}}" }} {{ "{{.State.Restarting}}" }}' {{ REDIS_CONTAINER_ADDRESS }}
|
||||
register: redis_state
|
||||
delegate_to: "{{ STACK_HOST }}"
|
||||
run_once: true
|
||||
retries: 120
|
||||
delay: 2
|
||||
until: >
|
||||
@@ -25,6 +27,8 @@
|
||||
{{ REDIS_EXEC_SHELL }}
|
||||
'{{ REDIS_CLI }} ping'
|
||||
register: redis_ping_ready
|
||||
delegate_to: "{{ STACK_HOST }}"
|
||||
run_once: true
|
||||
retries: 30
|
||||
delay: 2
|
||||
until: redis_ping_ready.stdout is search('PONG')
|
||||
|
||||
Reference in new issue
Block a user