mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-11-27 23:26:47 +00:00
Reference: https://chatgpt.com/share/6925e87d-3e0c-800f-bfff-902d1faa122e
19 lines
540 B
YAML
19 lines
540 B
YAML
- name: Check health status of '{{ item }}' container
|
|
shell: |
|
|
cid=$(docker compose ps -q {{ item }})
|
|
docker inspect \
|
|
--format '{{ "{{.State.Health.Status}}" }}' \
|
|
$cid
|
|
args:
|
|
chdir: "{{ docker_compose.directories.instance }}"
|
|
register: healthcheck
|
|
retries: 60
|
|
delay: 5
|
|
until: healthcheck.stdout == "healthy"
|
|
loop:
|
|
- "{{ MASTODON_SERVICE_NAME }}"
|
|
- "{{ MASTODON_STREAMING_SERVICE_NAME }}"
|
|
- "{{ MASTODON_SIDEKIQ_SERVICE_NAME }}"
|
|
loop_control:
|
|
label: "{{ item }}"
|
|
changed_when: false |