На 6.01.2015 в 07:44, Dan Callaghan написа:
Note that all of the "distro feature" variables which are
documented in
Nick's link above, and which you can see being used in those templates
(has_systemd, etc), are available to recipe kickstarts as well. So you
can put in your recipe things like:
<kickstart>
...
autopart {% if has_autopart_type is defined %}--type=btrfs{% end if %}
...
</kickstart>
in the same way that the server templates do it now.
So maybe it would be possible to eliminate the need for rendering the
templates client-side at all?
I will give it a try and see how it goes. I'm all for removing the rendering
part on the client-side.
One more thought though. It would be nice if the default template (on the
server) defines template blocks which can be overriden by the client. Say
client sends:
{% block partitioning %}
... some partitioning commands ...
{% endblock %}
This overrides the default autopart command on the server but leaves the rest of
the template intact. This way we can save test case authors from copying the
entire kickstart template when they have to modify just a few bits.
Or we could silently use server defaults and override only those kickstart
commands which were specified explicitly by the client.
--
Alex