try
Some checks failed
Deploy to ras-dan-01 / deploy (push) Failing after -24s

This commit is contained in:
2025-08-26 15:42:20 +02:00
parent 70679cd232
commit 34d57edbb2

View File

@@ -51,10 +51,13 @@
- name: Get container info
community.docker.docker_container_info:
name:
- "{{ project_name }}-web-1"
- "{{ project_name }}-db-1"
filters:
label:
- "com.docker.compose.project={{ project_name }}"
register: container_info
until: container_info.containers | length >= 2 # Assuming 2 services (web and db)
retries: 10
delay: 5
- name: Debug container_info
ansible.builtin.debug:
@@ -63,8 +66,7 @@
- name: Verify that web and db services are running
ansible.builtin.assert:
that:
- container_info.containers is defined
- (container_info.containers | selectattr('name', 'equalto', '{{ project_name }}-web-1') | first).State.Running
- (container_info.containers | selectattr('name', 'equalto', '{{ project_name }}-db-1') | first).State.Running
- (container_info.containers | selectattr('name', 'match', '.*-web-.*') | first).State.Running
- (container_info.containers | selectattr('name', 'match', '.*-db-.*') | first).State.Running