From d75a215ff5c2aec98065ef65d6c7d5d04298f33b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?= Date: Sat, 21 Sep 2024 08:23:36 +0000 Subject: [PATCH] update docker compose testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Sjögren --- molecule/default/verify.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/molecule/default/verify.yml b/molecule/default/verify.yml index ce4da07..437f88c 100644 --- a/molecule/default/verify.yml +++ b/molecule/default/verify.yml @@ -191,7 +191,6 @@ ansible.builtin.lineinfile: path: /var/tmp/{{ docker_user }}-docker-compose.yml line: | - version: '3' services: web: image: nginx:latest @@ -230,7 +229,6 @@ ansible.builtin.command: cmd: docker compose -f "/var/tmp/{{ docker_user }}-docker-compose.yml" up -d changed_when: false - register: compose_output - name: Verify compose website ansible.builtin.uri: @@ -258,7 +256,7 @@ - requests<2.32 # https://github.com/ansible-community/molecule-plugins/issues/256 - name: Create and start services - community.docker.docker_compose: + community.docker.docker_compose_v2: project_src: /var/tmp/ files: "{{ docker_user }}-docker-compose.yml" register: compose_output @@ -266,7 +264,7 @@ - name: Verify that web service are running ansible.builtin.assert: that: - - compose_output.services.web.tmp_web_1.state.running + - not compose_output.failed - name: Container verification block environment: