paulbsd-salt/states/dovecot/files/config.j2
2020-07-10 00:58:55 +02:00

24 lines
480 B
Django/Jinja

## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
{% macro render(key, value) %}
{%- if value is mapping %}
{{ key }} {
{%- for k, v in value.items() %}
{{ render(k, v) }}
{%- endfor %}
}
{%- elif value is string %}
{{- key }} = {{ value|replace("\\\\","\\") }}
{%- elif key == "includes" %}
{%- for inc in value %}
!include {{ inc }}
{%- endfor %}
{%- endif %}
{%- endmacro -%}
{%- for key, value in config.items() %}
{{ render(key, value) }}
{%- endfor %}