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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user