This commit is contained in:
psy 2021-01-15 12:39:33 +01:00
parent f8375f323c
commit bb4c8e9b6a
No known key found for this signature in database
GPG key ID: DFF5B17AC3A8ECF5

View file

@ -1,15 +1,15 @@
{%- macro keyvalue(key, value, depth=0) -%} {%- macro keyvalue(key, value, depth=0) -%}
{%- if value is string -%} {%- if value is string -%}
{{ key }}="{{ value }}"; {{ key }}="{{ value }}";
{%- elif value is mapping %} {%- elif value is mapping %}
{{ key }} { {{ key }} {
{% for key, value in value.items() %} {% for key, value in value.items() %}
{{ keyvalue(key, value) }} {{ keyvalue(key, value) }}
{% endfor %} {% endfor %}
} }
{% elif value is iterable and (value is not string and value is not mapping) -%} {% elif value is iterable and (value is not string and value is not mapping) -%}
{{ key }}=["{{ value|join('", "') }}"]; {{ key }}=["{{ value|join('", "') }}"];
{%- endif -%} {%- endif -%}
{%- endmacro -%} {%- endmacro -%}
# {{ ansible_managed }} # {{ ansible_managed }}