diff --git a/templates/traefik.toml.j2 b/templates/traefik.toml.j2
index 5e704aa88b4bcaf1debb014f9b468eddef6dc34c..2b725b0686b9ecce2a10d9b89c443770000351bb 100644
--- a/templates/traefik.toml.j2
+++ b/templates/traefik.toml.j2
@@ -10,7 +10,7 @@
   [entryPoints.websecure]
     address = ":443"
     [entryPoints.websecure.http]
-      middlewares = ["security-headers@file"{% if inventory_hostname not in groups.docker_tuleap %}, "limit@file"{% endif %}, "compression@file"]
+      middlewares = ["security-headers@file"{% if inventory_hostname not in groups.docker_tuleap | default([]) %}, "limit@file"{% endif %}, "compression@file"]
       [entryPoints.websecure.http.tls]
         options = "default"
         certResolver = "le"