From d06f05cdb31b0f1598b9abbafba1c8a58074003e Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 23 Oct 2024 17:32:02 +0200 Subject: [PATCH 1/7] dd --- roles/mgrote_docker_compose_inline/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 }}" -- 2.43.0 From 7f3b125d49a770ed5f3d530258642e96d78bed38 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 23 Oct 2024 17:33:16 +0200 Subject: [PATCH 2/7] dfgd --- docker-compose/wiki/docker-compose.yml.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose/wiki/docker-compose.yml.j2 b/docker-compose/wiki/docker-compose.yml.j2 index 62b8b337..4050394f 100644 --- a/docker-compose/wiki/docker-compose.yml.j2 +++ b/docker-compose/wiki/docker-compose.yml.j2 @@ -31,3 +31,5 @@ services: networks: traefik: external: true + +# test -- 2.43.0 From 77fb85228d86c73db62a9d3cd1556cb0f3c6c09b Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 23 Oct 2024 17:35:26 +0200 Subject: [PATCH 3/7] ff --- docker-compose/wiki/docker-compose.yml.j2 | 2 +- roles/mgrote_docker_compose_inline/tasks/main.yml | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/docker-compose/wiki/docker-compose.yml.j2 b/docker-compose/wiki/docker-compose.yml.j2 index 4050394f..02bbc32f 100644 --- a/docker-compose/wiki/docker-compose.yml.j2 +++ b/docker-compose/wiki/docker-compose.yml.j2 @@ -32,4 +32,4 @@ networks: traefik: external: true -# test +# testdfg diff --git a/roles/mgrote_docker_compose_inline/tasks/main.yml b/roles/mgrote_docker_compose_inline/tasks/main.yml index 4d8cd025..3769a4ec 100644 --- a/roles/mgrote_docker_compose_inline/tasks/main.yml +++ b/roles/mgrote_docker_compose_inline/tasks/main.yml @@ -55,9 +55,7 @@ become: true 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 + state: restarted loop: "{{ compose_files }}" when: - item.state == "present" -- 2.43.0 From 75136a62c214c00462deffe51400527d5b044653 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 23 Oct 2024 17:54:14 +0200 Subject: [PATCH 4/7] df --- roles/mgrote_docker_compose_inline/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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" -- 2.43.0 From 9ae6e0c31e9e972de0b4a6acdec53bbe21ef1029 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 23 Oct 2024 17:56:53 +0200 Subject: [PATCH 5/7] dsfgd --- roles/mgrote_docker_compose_inline/tasks/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/mgrote_docker_compose_inline/tasks/main.yml b/roles/mgrote_docker_compose_inline/tasks/main.yml index fa69b72a..94a28ba1 100644 --- a/roles/mgrote_docker_compose_inline/tasks/main.yml +++ b/roles/mgrote_docker_compose_inline/tasks/main.yml @@ -51,11 +51,13 @@ when: - item.network is defined -- name: (re)start container +- name: restart changed container become: true community.docker.docker_compose_v2: project_src: "{{ compose_dest_basedir }}/{{ item.name }}" state: restarted + dependencies: true + pull: missing loop: "{{ compose_files }}" when: - item.state == "present" -- 2.43.0 From de567ac2e1ebbb04f730bca9ac6b185d7ebddc69 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 23 Oct 2024 17:57:04 +0200 Subject: [PATCH 6/7] sdfg --- docker-compose/wiki/docker-compose.yml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose/wiki/docker-compose.yml.j2 b/docker-compose/wiki/docker-compose.yml.j2 index 02bbc32f..7e823c9f 100644 --- a/docker-compose/wiki/docker-compose.yml.j2 +++ b/docker-compose/wiki/docker-compose.yml.j2 @@ -32,4 +32,4 @@ networks: traefik: external: true -# testdfg +# testdfgdsfgdf -- 2.43.0 From 1f0c04efa3e6cb1bc0ecb9a92d0d4b210e094ebe Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 23 Oct 2024 17:59:21 +0200 Subject: [PATCH 7/7] fdgd --- docker-compose/wiki/docker-compose.yml.j2 | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker-compose/wiki/docker-compose.yml.j2 b/docker-compose/wiki/docker-compose.yml.j2 index 7e823c9f..62b8b337 100644 --- a/docker-compose/wiki/docker-compose.yml.j2 +++ b/docker-compose/wiki/docker-compose.yml.j2 @@ -31,5 +31,3 @@ services: networks: traefik: external: true - -# testdfgdsfgdf -- 2.43.0