From d3fe4e7bed62cc8d95ed6dbafad0e421afb15973 Mon Sep 17 00:00:00 2001
From: istmxrein <maximilian.reinheimer@stud.h-da.de>
Date: Wed, 20 Sep 2023 11:34:57 +0200
Subject: [PATCH] Fix error in docker role

---
 basic/roles/docker/tasks/autoheal.yml | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/basic/roles/docker/tasks/autoheal.yml b/basic/roles/docker/tasks/autoheal.yml
index 5740b4c..903ab11 100644
--- a/basic/roles/docker/tasks/autoheal.yml
+++ b/basic/roles/docker/tasks/autoheal.yml
@@ -1,10 +1,15 @@
+- name: Pull the latest autoheal image
+  community.docker.docker_image:
+    name: "willfarrell/autoheal"
+    source: pull
+
 - name: Start Autoheal container
   community.docker.docker_container:
     name: autoheal
     image: willfarrell/autoheal
     volumes:
       - /var/run/docker.sock:/var/run/docker.sock
-    environment:
-      - AUTOHEAL_CONTAINER_LABEL=all
+    env:
+      AUTOHEAL_CONTAINER_LABEL: all
     restart_policy: always
     state: started
-- 
GitLab