diff --git a/roles/mgrote_docker_compose_inline/tasks/main.yml b/roles/mgrote_docker_compose_inline/tasks/main.yml index 3769a4ec..fa69b72a 100644 --- a/roles/mgrote_docker_compose_inline/tasks/main.yml +++ b/roles/mgrote_docker_compose_inline/tasks/main.yml @@ -63,9 +63,9 @@ - name: stop old container become: true - ansible.builtin.command: docker-compose down # noqa no-changed-when - args: - chdir: "{{ compose_dest_basedir }}/{{ item.name }}" + community.docker.docker_compose_v2: + project_src: "{{ compose_dest_basedir }}/{{ item.name }}" + state: absent loop: "{{ compose_files }}" when: - item.state == "absent"