diff --git a/roles/mgrote_docker_compose_inline/tasks/main.yml b/roles/mgrote_docker_compose_inline/tasks/main.yml index 6bde5746..4d8cd025 100644 --- a/roles/mgrote_docker_compose_inline/tasks/main.yml +++ b/roles/mgrote_docker_compose_inline/tasks/main.yml @@ -53,9 +53,9 @@ - name: (re)start container become: true - ansible.builtin.command: docker-compose up -d - args: - chdir: "{{ compose_dest_basedir }}/{{ item.name }}" + community.docker.docker_compose_v2: + project_src: "{{ compose_dest_basedir }}/{{ item.name }}" + state: restarted register: start_result # speichere ergebnis in var changed_when: "start_result.rc == 0" # markiere tasks als changed when exit-code == 0 loop: "{{ compose_files }}"