paulbsd-salt/states/dovecot/files/config.j2
2021-08-19 21:15:24 +02:00

21 lines
482 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 %}