[Spacewalk-list] Code Snippet Question

Wojtak, Greg (Superfly) GregWojtak at quickenloans.com
Fri Apr 13 18:10:38 UTC 2012


I'm attempting to use snippets in my kickstarts for the first time and I'm running into some problems.   More specifically I am having trouble using ksmeta variables in my snippets in my %post scripts.

We've got a few profiles that will share the same %post scripts and I wanted to use snippets to be able to update this script in one place.  So I create the system record with cobbler with something like:

cobbler system add … --ksmeta="env=test" …

In my snippet, I try to do something like:

#raw
…
echo $env
…
#endraw

In the script for the kickstart, I have:

$SNIPPET(/path/to/snippet)

with the "Template" box checked.

I think I'm just doing something wrong trying to reference the ksmeta variable within the snippet, but I'm not sure how to go about doing that.  Can someone help out?  For as awesome as cobbler is, the documentation seems to be woefully lacking.

Thanks!

Greg




More information about the Spacewalk-list mailing list