mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-11-04 04:08:15 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			459 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			459 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
 | 
						|
    - streaming
 | 
						|
    - sidekiq
 | 
						|
  loop_control:
 | 
						|
    label: "{{ item }}"
 | 
						|
  changed_when: false |