it’s really a minor issue, but it’s at least annoying me in a way that I will ask for advice
I am creating a config based on this Jinja template:
listen-on port 53 {
{% for ip in ips -%}
{{ ip }};
{% endfor -%}
};
ips is a list of IPs, like this:
ips:
- 10.0.0.53
- 10.0.2.53
- 10.0.4.53
Now the result is as follows:
listen-on port 53 {
10.0.0.53;
10.0.2.53;
10.0.4.53;
};
Based on the template I would expect the closing curly brace }; to be positioned under the “l” of the “listen-on” statement, but clearly some whitespace has been added in front of it.
Regarding the second solution, did you get that from experience, or can you recommend a website (next to the Jinja homepage itself) where this is explained in more detail ?