From 5123a9bdb72b550b0ddfa2915c81c94e1f30d216 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Th=C3=A9o?= <theo@le-filament.com>
Date: Tue, 7 Jun 2022 16:58:08 +0200
Subject: [PATCH] [FIX] template even when extra vars not defined

---
 templates/nextcloud.yaml.j2 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/templates/nextcloud.yaml.j2 b/templates/nextcloud.yaml.j2
index 1c1e586..a9e953f 100644
--- a/templates/nextcloud.yaml.j2
+++ b/templates/nextcloud.yaml.j2
@@ -20,9 +20,11 @@ services:
       - NEXTCLOUD_ADMIN_USER={{ cloud_admin_user }}
       - NEXTCLOUD_ADMIN_PASSWORD={{ cloud_admin_pass }}
       - REDIS_HOST=redis
+{% if extra_cloud_vars is defined %}
 {% for var in extra_cloud_vars %}
       - {{ var }}
 {% endfor %}
+{% endif %}
     volumes:
       - nextcloud:/var/www/html:z
       - ./nextcloud-extra.ini:/usr/local/etc/php/conf.d/nextcloud-extra.ini:ro
-- 
GitLab