From d4110a0608f939d5ddc0e96066bfe9f23ae33bb5 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Sat, 11 Mar 2023 21:39:58 +0100 Subject: [PATCH] =?UTF-8?q?[FIX]=20robusterer=20Container=20Neustart;=20ig?= =?UTF-8?q?noriere=20environment.env=20=C3=A4nderungen=20nicht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tasks/main.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tasks/main.yaml b/tasks/main.yaml index cb7ccba..071f3da 100644 --- a/tasks/main.yaml +++ b/tasks/main.yaml @@ -55,6 +55,7 @@ dest: "/opt/gitea/environment.env" owner: root mode: 0600 + register: gitea_env - name: Upload docker-compose.yaml ansible.builtin.template: @@ -62,9 +63,12 @@ dest: /opt/gitea/docker-compose.yaml owner: root mode: 0600 + register: gitea_container -- name: Create Gitea container +- name: Create / Recreate Gitea container community.docker.docker_compose: project_src: /opt/gitea state: present - recreate: smart + restarted: true + when: gitea_env.changed or gitea_container.changed +