From cb60d2c601407863200dde17a81771ccece27213 Mon Sep 17 00:00:00 2001 From: AndrewPaglusch Date: Sat, 28 Jan 2023 00:28:42 -0600 Subject: [PATCH] fix bug that would result in {} being added to config if var unset --- templates/lighthouse_config.yml.j2 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/lighthouse_config.yml.j2 b/templates/lighthouse_config.yml.j2 index af8f190..c0595cb 100644 --- a/templates/lighthouse_config.yml.j2 +++ b/templates/lighthouse_config.yml.j2 @@ -28,8 +28,9 @@ lighthouse: # format: # # - "192.168.77.1" - - {{ nebula_lighthouse_extra_config | to_nice_yaml | indent(2) }} + {% if nebula_lighthouse_extra_config|length > 0 %} + {{- nebula_lighthouse_extra_config | to_nice_yaml | indent(2) }} + {% endif %} listen: # 0.0.0.0 means "all interfaces," which is probably what you want