From 201b0861677e226867bbfafb6800e75b446aefaa Mon Sep 17 00:00:00 2001 From: jonnybravo Date: Tue, 26 Aug 2025 15:59:16 +0200 Subject: [PATCH] try --- deploy_remote.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy_remote.yml b/deploy_remote.yml index 2877f22..0d0d86f 100644 --- a/deploy_remote.yml +++ b/deploy_remote.yml @@ -54,7 +54,7 @@ containers: true containers_all: true register: host_info - until: host_info.containers is defined and (host_info.containers | length) >= 2 + until: (host_info.containers | selectattr('Names', 'match', '.*-web') | list | length) >= 1 and (host_info.containers | selectattr('Names', 'match', '.*-db') | list | length) >= 1 retries: 10 delay: 5 @@ -65,7 +65,7 @@ - name: Verify that web and db services are running ansible.builtin.assert: that: - - (host_info.containers | selectattr('Config.Labels.com.docker.compose.project', 'equalto', project_name) | selectattr('Names', 'match', '.*-web-.*') | first).State.Running - - (host_info.containers | selectattr('Config.Labels.com.docker.compose.project', 'equalto', project_name) | selectattr('Names', 'match', '.*-db-.*') | first).State.Running + - (host_info.containers | selectattr('Names', 'match', '.*-web') | first).Status is search('Up') + - (host_info.containers | selectattr('Names', 'match', '.*-db') | first).Status is search('Up')