Closed aaannz closed 5 years ago
Oh, nice! :+1:
Anything more I can do to be this accepted?
@aaannz Sorry for the long delay. @baby-gnu has offered to have a look at this on Monday.
The change is not trivial, I'm trying to figure out how to test that ;-)
Note that I bugged on {{ intendation }}
, it should be {{ indentation }}
.
It can be fixed in another PR.
Regards.
Thank you for the review. I changed it based on your feedback, including change for intendation to indentation in last commit.
Thank you for the review. I changed it based on your feedback, including change for intendation to indentation in last commit.
Thanks a lot. I'm looking at Jinja2 documentation to find a better way of doing indentation of included files. We can't do {% include 'foo.jinja' with context | indent(width=2) %}
Let's get that merged for now, I'll do a dedicated PR for the indent optimization.
Thanks for your patience and fast response @aaannz.
@baby-gnu Thanks for taking the time to review. A common way I've found indent
being done in our formulas can be seen from this search:
I.e. something like:
{%- macro do_something(width=4) %}
{%- filter indent(width) %}
...
{%- endfilter %}
{%- endmacro %}
A common way I've found indent being done in our formulas can be seen from this search:
Thanks @myii, I think I found a better way:
{%- filter indent(width=4) %}
{%- include "./sub-template.yml.j2" %}
{%- endfilter %}
I'm making tests to take care of the first line and how to manage spaces.
Regards.
This allows host entries to be defined under subnet.