2016-04-08 17:50:52 +02:00
|
|
|
# Managed by config management
|
|
|
|
|
2016-04-08 18:27:15 +02:00
|
|
|
{%- macro format_value(key, value) %}
|
|
|
|
{#- Some settings, like virtual_alias_maps can take multiple values. Handle this case. -#}
|
|
|
|
{%- if value is iterable and value is not string -%}
|
|
|
|
{%- for item in value %}
|
2016-04-08 17:50:52 +02:00
|
|
|
{{ key }} {{ item }}
|
2016-04-08 18:27:15 +02:00
|
|
|
{%- endfor %}
|
|
|
|
{%- else -%}
|
2016-04-08 17:50:52 +02:00
|
|
|
{{ key }} {{ value }}
|
2016-04-08 18:27:15 +02:00
|
|
|
{%- endif -%}
|
|
|
|
{%- endmacro %}
|
|
|
|
|
|
|
|
{%- if data is mapping %}
|
|
|
|
{% for key, value in data.iteritems() %}
|
|
|
|
{{ format_value(key, value) }}
|
|
|
|
{%- endfor -%}
|
|
|
|
{%- else %}
|
|
|
|
{#- Some settings need order, handle OrderedDict #}
|
|
|
|
{% for item in data %}
|
|
|
|
{{ format_value(item.keys()[0], item.values()[0]) }}
|
|
|
|
{%- endfor -%}
|
|
|
|
{%- endif %}
|