Wait for Gokapi's healthcheck on first run

The 'Gokapi started' log line is not always flushed to log.txt, so the
first-run wait timed out even though the super admin had been created.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Phil
2026-10-31 10:09:14 -06:00
co-authored by Claude Opus 5.5
parent 9b9be6a2f0
commit 7a68fdf96f
+6 -4
View File
@@ -47,10 +47,12 @@
no_log: true no_log: true
- name: Wait for the one-off gokapi to finish starting - name: Wait for the one-off gokapi to finish starting
ansible.builtin.wait_for: ansible.builtin.command: docker inspect -f '{{ "{{" }}.State.Health.Status{{ "}}" }}' gokapi-init
path: /opt/stacks/gokapi/data/log.txt register: gokapi_init_health
search_regex: Gokapi started until: gokapi_init_health.stdout == "healthy"
timeout: 60 retries: 30
delay: 3
changed_when: false
always: always:
- name: Stop the one-off gokapi - name: Stop the one-off gokapi
ansible.builtin.command: docker rm -f gokapi-init ansible.builtin.command: docker rm -f gokapi-init