From e38a7f96b2e9b72c30f6e22d2cfcb9d59eb7792a Mon Sep 17 00:00:00 2001 From: Ludovic Cartier Date: Tue, 24 Dec 2024 10:54:28 +0100 Subject: [PATCH] template pxarexclude - verify if vars are defined before looping --- templates/pxarexclude.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/pxarexclude.j2 b/templates/pxarexclude.j2 index ee000a4..093f261 100644 --- a/templates/pxarexclude.j2 +++ b/templates/pxarexclude.j2 @@ -1,7 +1,11 @@ /* +{% if backup_path_exclude is defined %} {% for item in backup_path_exclude %} {{ item.value }} {% endfor %} +{% endif %} +{% if backup_path_include is defined %} {% for item in backup_path_include %} !{{ item.path }} {% endfor %} +{% endif %}