In order to minimize the kickstart files within satellite we can use extra 
kernel parameters to determine how system will be installed and registered to 
the satellite.

for instance we send this extra kernel parameters during new install
pc=1-web-server common=1-common-rhel5 site=US sla=7-24 app=Web-server 

Would this be interesting for spacewalk or the cobbler project?

Cheers,
Lars

mock up Kickstart post section which will utilize the kernel parameters:
--------------------------------------------------------------------------------------------------

%post

from post_kickstart import postKickstart

# parse /proc/cmdline for additional parameters and create a RHN API session 
post = postKickstart("sat-user","mypasswd","satellite.mydom.com")

# enable logging
post.enable_logging('/root/redhat-ks-post')

# Delete old profile from the satellite, if exists.
post.delete_duplicated_profile()

# register with the satellite using the values from kernel option parameters
# which represent the activation keys in the satellite. (pc=1-web-server 
common=1-common-rhel5) 
# touch /mnt/sysimage/etc/sysconfig/rhn/up2date in -nochroot will prevent 
automatic registration

post.register_with_statellite("pc","common")

# join system groups
post.set_system_group(post.get_hw_info.model, "site")

# Set a couple of custom info keys
post.set_custom_info("site", "app", "sla")

post.add_note("ILO address", "<a href>" + post.get_hw_info.ilo + "</a>")

# Temporarly joins post-cmd configuration channel and deploy and execute the 
scripts which represents the 
# actication key , might be post scripts for adding users and custom scripts 
for differents product configuration.
#    usage: (conf-chan-label, actkey, actkey , .... )
post.post_exec_cmds("post-cmd", "common" ,"pc")

_______________________________________________
Spacewalk-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to