From b46012bf7aa7144ee50ec147c8278d69a43936d1 Mon Sep 17 00:00:00 2001 From: psy Date: Fri, 29 Jan 2021 15:15:56 +0100 Subject: [PATCH] add spaces and case for bool values --- templates/local.d.config.j2 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/local.d.config.j2 b/templates/local.d.config.j2 index 54e6535..16e8ea6 100644 --- a/templates/local.d.config.j2 +++ b/templates/local.d.config.j2 @@ -1,6 +1,8 @@ {%- macro keyvalue(key, value, depth=0) %} {%- if value is string -%} - {{ key }}="{{ value }}"; + {{ key }} = "{{ value }}"; + {%- elif value is boolean -%} + {{ key }} = {{ value|lower }}; {%- elif value is mapping -%} {{ key }} { {% for key, value in value.items() %} @@ -8,7 +10,7 @@ {% endfor -%} } {%- elif value is iterable and (value is not string and value is not mapping) -%} - {{ key }}=["{{ value|join('", "') }}"]; + {{ key }} = ["{{ value|join('", "') }}"]; {%- endif -%} {% endmacro -%}