-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow hosts to be specified for subnet as well #29
Conversation
Oh, nice! 👍 |
This allows host entries to be defined under subnet.
Anything more I can do to be this accepted? |
The change is not trivial, I'm trying to figure out how to test that ;-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I finally managed to understand the changes, you put the host
template to a dedicated jinja file to include it at different places.
Note that I bugged on 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with the new changes.
Thanks a lot. I'm looking at Jinja2 documentation to find a better way of doing indentation of included files. We can't do 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 I.e. something like: {%- macro do_something(width=4) %}
{%- filter indent(width) %}
...
{%- endfilter %}
{%- endmacro %} |
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.