bbinet / pillarstack

Custom saltstack ext_pillar heavily based on jinja2 for maximum flexibility
MIT License
59 stars 15 forks source link

Allow indentation in stack configuration files #44

Closed cmhamill closed 6 years ago

cmhamill commented 6 years ago

Accommodate leading whitespace in stack configuration files. This allows the Jinja to be formatted in a traditional, nested indentation style.

For example:

{% for role in pillar.get('roles', []) %}
    role/{{ role }}.yml
    {% if stack.meta[role].foo %}
        extra/thing.yml
    {% endfor %}
{% endfor %}
cmhamill commented 6 years ago

@bbinet I've update it to strip whitespace from item once.

bbinet commented 6 years ago

Thank you @cmhamill