Excerpts from Alexander Todorov's message of 2015-01-06 22:17 +10:00:
На 6.01.2015 в 07:47, Dan Callaghan написа:
> This is one of the "distro feature variables" already mentioned: end. It
> expands to %end if supported or else empty string. In the server
> templates we use it like this:
>
> %post
> something
> {{ end }}
Here
https://git.beaker-project.org/cgit/beaker/tree/Server/bkr/server/kicksta...
it is not used but %end is used instead. Would you like a bug opened, or even
a patch for that (all other templates as well) ?
That's because the "default" template is only used for RHEL6 onwards.
The older families have specific templates still:
https://git.beaker-project.org/cgit/beaker/tree/Server/bkr/server/kicksta...
Prior to Beaker 0.18 we only had the family-specific templates, there
was no default, but we were ending up with lots and lots of
almost-identical templates and we had to make a new copy for every new
family name that arose.
We could in theory consolidate those other templates for RHEL < 6 into
the "default" one by adding more conditionals and feature variables, and
I did consider doing that as part of Beaker 0.18, but it didn't seem
worthwhile.
The {{ end }} trick is now only used in a few snippets which define new
sections, which is admittedly not many, but for example:
https://git.beaker-project.org/cgit/beaker/tree/Server/bkr/server/snippet...
--
Dan Callaghan <dcallagh(a)redhat.com>
Software Engineer, Hosted & Shared Services
Red Hat, Inc.