paulbsd-salt/states/dovecot/templates/config.j2
Paul Lecuq 78bd7aed87
All checks were successful
continuous-integration/drone/push Build is passing
updated dovecot state
2023-07-13 19:47:03 +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 %}