diff --git a/playbooks/deploy-skaldsong.yaml b/playbooks/deploy-skaldsong.yaml index 9094e82..c6bc254 100644 --- a/playbooks/deploy-skaldsong.yaml +++ b/playbooks/deploy-skaldsong.yaml @@ -112,6 +112,12 @@ verify: shell: curl -sf -o /dev/null http://localhost:{{ host_port }}/health changed_when: "false" - - name: skaldsong container running + healthy - shell: docker ps --filter name=^/skaldsong$ --format '{{.Status}}' | grep -q 'healthy' + - name: skaldsong container running + # Grep for '^Up' (not 'healthy') — verify runs immediately after the + # deploy step finishes, which is well before the container's + # start_period (30s) elapses. The 'healthy' state from docker ps is + # a delayed echo of the same /health probe verify 1/2 already + # confirms, so racing the start_period here is bogus. Keep this + # check to catch the "container exited entirely" case. + shell: docker ps --filter name=^/skaldsong$ --format '{{.Status}}' | grep -q '^Up' changed_when: "false"