blob: 03896bdc991133fc84529a6de78dfa2e14c84fc3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# vi: ft=nginx
# This file is managed by Ansible. DO NOT CHANGE!
{%- macro add_tabs(n) %}{% for i in range(n) %} {%endfor%}{% endmacro %}
{% macro procval(key, val, tabs) -%}
{% if val is mapping %}{{ add_tabs(tabs) }}{{ key }} {
{% for k, v in val.items() %}{{ procval(k,v,tabs+1) }}
{{ add_tabs(tabs) }}{% endfor -%} }
{% elif val is iterable and (val is not string and val is not mapping) %}{% for v in val %}{{ add_tabs(tabs) }}{{ key }} {{ v }};
{% endfor %}
{%- else -%}
{{ add_tabs(tabs) }}{{ key }} {{ val }};
{%- endif -%}
{% endmacro %}
server {
{% for key in item.value -%}
{{ procval(key, item.value[key], 1) }}
{% endfor -%}
}
|