ansible-role-rspamd/templates/local.d.config.j2
2021-01-29 15:15:56 +01:00

20 lines
569 B
Django/Jinja

{%- macro keyvalue(key, value, depth=0) %}
{%- if value is string -%}
{{ key }} = "{{ value }}";
{%- elif value is boolean -%}
{{ key }} = {{ value|lower }};
{%- 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 }}
{% for key, value in item.value.items() %}
{{ keyvalue(key, value) }}
{% endfor %}