diff --git a/templates/local.d.config.j2 b/templates/local.d.config.j2 index 333e9e2..6919fea 100644 --- a/templates/local.d.config.j2 +++ b/templates/local.d.config.j2 @@ -1,15 +1,15 @@ {%- macro keyvalue(key, value, depth=0) -%} -{%- if value is string -%} -{{ key }}="{{ value }}"; -{%- elif value is mapping %} -{{ key }} { - {% for key, value in value.items() %} - {{ keyvalue(key, value) }} - {% endfor %} -} -{% elif value is iterable and (value is not string and value is not mapping) -%} -{{ key }}=["{{ value|join('", "') }}"]; -{%- endif -%} + {%- if value is string -%} + {{ key }}="{{ value }}"; + {%- elif value is mapping %} + {{ key }} { + {% for key, value in value.items() %} + {{ keyvalue(key, value) }} + {% endfor %} + } + {% elif value is iterable and (value is not string and value is not mapping) -%} + {{ key }}=["{{ value|join('", "') }}"]; + {%- endif -%} {%- endmacro -%} # {{ ansible_managed }}