[Spacewalk-list] Kickstart Snippets in Post Scripts
David Rock
david at graniteweb.com
Sat Aug 7 16:26:48 UTC 2010
* Colin Coe <colin.coe at gmail.com> [2010-08-07 13:18]:
> I maybe misunderstanding but in a kickstart the only place you can put
> scripts (and snippets are effectively just pieces of a script) is in
> either the pre or post sections.
>
> The syntax is $SNIPPET('snippet_name_here') and make sure that your
> snippet starts with '#raw' and ends with '#end raw'.
>
> A good information source is
> https://fedorahosted.org/cobbler/wiki/KickstartTemplating.
Thanks. I am currently running a couple more tests with #raw #end raw
in the snippets. I've been reading the KickstartTemplating page (and the
KickstartSnippets one) quite a bit. That's mainly why I have the
confusion. The implication is that snippets are for templates only.
Maybe I don't quite understand what a template really is.
I was looking to see what is actually getting generated, so I tried the
following to look at the profile:
cobbler profile getks --name=testprofile:1:CSC
and looking at the %post section I see:
%post
(
$SNIPPET('spacewalk/1/deploy_config_channel_files')
$SNIPPET('spacewalk/1/config_hostname')
$SNIPPET('spacewalk/1/config_network')
$SNIPPET('spacewalk/1/install_admin_users')
$SNIPPET('spacewalk/1/install_jdk_6u17')
$SNIPPET('spacewalk/1/install_tsm')
$SNIPPET('spacewalk/1/config_rhn_and_update')
$SNIPPET('spacewalk/1/config_ntpd')
groupadd -g 19300 www
useradd -u 30 -g 19300 -c "web hosting" -d /web/www www
mkdir /web/webstore
chmod 750 /web/webstore
chown www:www /web/webstore
) >> /root/ks-post.log 2>&1
If I use cobbler profile getks, should I see the snippets, or should I
see the expanded contents of the snippets? If I should see the expanded
code, what would cause me not to?
--
David Rock
david at graniteweb.com
More information about the Spacewalk-list
mailing list