mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-11-02 03:08:05 +00:00
Added cleanup to mastodon
This commit is contained in:
19
roles/web-app-mastodon/tasks/01_wait.yml
Normal file
19
roles/web-app-mastodon/tasks/01_wait.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
- 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
|
||||
- streaming
|
||||
- sidekiq
|
||||
loop_control:
|
||||
label: "{{ item }}"
|
||||
changed_when: false
|
||||
Reference in New Issue
Block a user