[Spacewalk-list] Kickstart parameters and values

Kalchik, Jeffery JDKalchik at landolakes.com
Tue Jun 30 16:28:05 UTC 2015


Good morning, Zyrius (et al.)

You should be able to acquire the value of $http_server in any kickstart file or snippet, as long as it’s not in the middle of a #raw/#end raw tag set.  You might want to take a look in /var/lib/cobbler/snippets/download_config_files for a Spacewalk distributed snippet that uses $http_server.

The line of code below that used ACTIVATION_KEYS used $getVar to acquire the value of $redhat_management_key, or a default value.  This way, I know that ACTIVATION_KEY does have a value (whether or not is actually valid is left as an exercise for the student <grin>).  This line of code exists in a code snippet, for each major production channel here, referenced in the appropriate kickstart file (I use cobbler more directly than most.)  I don’t see any reason that you shouldn’t be able to use this technique within Spacewalk’s kickstart profiles and scripts.

All of my system provisioning starts down in cobbler, and I’m using the cobbler terminology above.  If you’re working within the Spacewalk web interface, you’ll be in the kickstart management section, working with kickstart profiles (equivalent of cobbler kickstart files,) and scripts (equivalent of cobbler snippets.)  After making your changes to the Spacewalk kickstart profiles and Spacewalk kickstart scripts, check the Spacewalk kickstart file to see what your actual kickstart file will be.

Edit: And there’s the trick……near the bottom of the Spacewalk kickstart script edit page, there’s a series of check boxes for nochroot, erroronfail, and Template.  You have to check the Template box to enable the cobbler macro/koan/cheetah/template system.  If not, you’ll have to hard code your values in the script, which is not what you want to do, apparently.

Jeff Kalchik
Systems Engineering
Land O’Lakes
651-375-2421


From: zyrius as [mailto:zyriusa at yahoo.com]
Sent: Tuesday, June 30, 2015 3:31 AM
To: Kalchik, Jeffery; spacewalk-list at redhat.com
Subject: Re: [Spacewalk-list] Kickstart parameters and values

Hi Jeff,

I'm creating kickstart file with spacewalk kickstart wizard. Maybe you could advice where and what should i write to get value of $http_server or $redhat_management_server. I want to download some extra files from spacewalk master or proxies, but need to know from which server kickstart was called.



On Monday, June 29, 2015 5:17 PM, "Kalchik, Jeffery" <JDKalchik at landolakes.com<mailto:JDKalchik at landolakes.com>> wrote:

Good morning, Zyrius.

They seem to work for me.

Those are not shell variables, but koan/cheetah fields.  You can’t use them directly inside #raw/#end raw tags.  You can set them into shell variables, though.

From a code snippet:

export ACTIVATION_KEYS='$getVar("redhat_management_key","DEFAULT_KEY”)'

From the resulting kickstart:

export ACTIVATION_KEYS='SERVER_KEY'

Yes, I’ve changed the values.  I’ve been doing this for 5+ years.

Jeff Kalchik
Systems Engineering
Land O’Lakes
651-375-2421

From: spacewalk-list-bounces at redhat.com<mailto:spacewalk-list-bounces at redhat.com> [mailto:spacewalk-list-bounces at redhat.com] On Behalf Of zyrius as
Sent: Monday, June 29, 2015 3:38 AM
To: spacewalk-list at redhat.com<mailto:spacewalk-list at redhat.com>
Subject: [Spacewalk-list] Kickstart parameters and values

Hello,
I'm creating kickstart file on spacewalk 2.3 and want to use value of $http_server or $redhat_management_server in post script section. It works in advanced options -> custom options, but not in post scripts. How can i get that value in post section  script?

This message may contain confidential material from Land O'Lakes, Inc. (or its subsidiary) for the sole use of the intended recipient(s) and may not be reviewed, disclosed, copied, distributed or used by anyone other than the intended recipient(s). If you are not the intended recipient, please contact the sender by reply email and delete all copies of this message.

This message may contain confidential material from Land O'Lakes, Inc. (or its subsidiary) for the sole use of the intended recipient(s) and may not be reviewed, disclosed, copied, distributed or used by anyone other than the intended recipient(s). If you are not the intended recipient, please contact the sender by reply email and delete all copies of this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20150630/0fe1fc05/attachment.htm>


More information about the Spacewalk-list mailing list