На 12.01.2015 в 06:43, Dan Callaghan написа:
We could add a way for *users* to override the snippets in their recipe
XML. Maybe an element like
<ks_snippet name="rhts_partitions">
...
</ks_snippet>
But I don't know if that would be generally useful. Most of the time the
snippets provide important functionality (for example admins use these
to add system-specific hacks that are needed for hardware reasons) and
if the recipe overrides that it may need to provide the same
functionality anyway.
At the moment, when provisioning with a custom kickstart most of these snippets
are not used (except %post scripts) b/c the user provides a complete kickstart
definition. So nothing like admin defined system hacks or things like that are
used at the moment.
IMO using template blocks will be more flexible. It will allow users to specify
what they want to override explicitly while still using the global/system
defaults as defined by the admin. Just place the snippets as the default content
of the template block.
Are there any other blocks you would want to override, besides the
partitioning commands?
Reciting from memory at the moment we're using the following in our test cases:
* display mode = gui, vnc, text, cmd-line
* partitioning
* packages
* scriptlets, %post mostly but there are a few %pre as well
* timezone
* key (for RHEL 5)
* repo definitions (to define add-on repos), mostly for upgrades
* upgrade or install mode
* rescue mode (not actively used but IIRC rescue mode can be fully automated
with kickstart as well, for testing purposes of course)
* install source (http, nfs, ftp, harddrive)
* driverdisk
* updates images
* networking
* bootloader configuration (can be considered part of partitioning)
* ssh user/password config
I think it will be much easier to provide template blocks for all kickstart
commands with special handling of multiple line sections like partitioning,
packages and scripts.
--
Alex