19 lines
579 B
Text
19 lines
579 B
Text
{#- ensure that grains pillar exists -#}
|
|
{%- if pillar['grains'] is defined -%}
|
|
{#- loop through grains -#}
|
|
{%- for key, value in pillar['grains'].items() recursive -%}
|
|
{%- set depth=loop.depth %}
|
|
{% for i in range(1,depth) -%}{{ " " }}{%- endfor -%}
|
|
{{ key }}:
|
|
{%- if value is mapping -%}
|
|
{{ loop(value.items()) }}
|
|
{%- else %}
|
|
{%- if value is not none -%}
|
|
{%- for item in value %}
|
|
{% for i in range(0,depth) -%}{{ " " }}{%- endfor -%}
|
|
- {{ item }}
|
|
{%- endfor -%}
|
|
{%- endif -%}
|
|
{%- endif -%}
|
|
{%- endfor -%}
|
|
{%- endif -%}
|