On 16/04/15 19:50, Jan-Piet Mens wrote:
Quite off-topic for a DNS list, but have you
considered using a Jinja2
`join' filter?
Hi JP,
I do know about the 'join' filter, and use it in some of my templates
already. The issue here is Knot's requirement to name every interface
and remote. With what I need to do, I have to template all the remotes
first, and then remember the name of each remote, and then use that
later in the 'groups' section. My remotes list expands to one or more
addresses depending on various conditions (private addresses, IPv6
addresses, etc). A simple join won't help :(
Ideally, Knot would not have a 'groups' section, but rather, the remotes
section would allow grouping within it, much like BIND's 'masters' macro.
I'm following the development of Knot, and see that it's going to switch
to YAML for version 2. That should allow easier templating, especially
as Knot 2 is also introducing patterns, like NSD4.
Regards,
Anand