From 5c162cca2b4cb0a9429a3dde4917aa40df65bb3d Mon Sep 17 00:00:00 2001 From: Leonidas Avdelas Date: Wed, 21 Jan 2026 17:05:17 +0200 Subject: [PATCH] Allow source_directories to be empty Signed-off-by: Leonidas Avdelas --- templates/config.yaml.j2 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/templates/config.yaml.j2 b/templates/config.yaml.j2 index 1d059f2..d6efc51 100644 --- a/templates/config.yaml.j2 +++ b/templates/config.yaml.j2 @@ -3,10 +3,7 @@ # Managed by Ansible, please don't edit manually # Full config: https://torsion.org/borgmatic/docs/reference/config.yaml -{% if borg_source_directories is not defined or borg_source_directories | length == 0 %} -source_directories: - - /etc/hostname # prevent empty backupconfig -{% else %} +{% if borg_source_directories is defined and borg_source_directories | length > 0 %} source_directories: {% for dir in borg_source_directories %} - {{ dir }}