compass-adapters/cobbler/snippets/kickstart_done
Xicheng Chang f639a5d67f Separate cobbler IP from compass IP in cobbler snippets
Compass IP now is isolated so that during PXE process,
a pxe-server IP is available and DHCP will have its own
subnet and cobbler server owns the vip for that subnet.
This only partially closes bug #1393957, further change
will be maide in compass-core. So no "Closes-Bug" will
be added in the message.
Partial-bug: #1393957
Change-Id: I0d693f2958a33b5a093728dccf063e2114c7406b
2014-11-20 11:09:33 -08:00

85 lines
4.6 KiB
Plaintext

#set system_name = $getVar('system_name','')
#set profile_name = $getVar('profile_name','')
#set breed = $getVar('breed','')
#set os_version = $getVar('os_version','')
#if $getVar("compass_server","") != ""
#set srv = $getVar('compass_server','')
#else
#set srv = $getVar('server','')
#end if
#set kickstart = $getVar('kickstart','')
#set run_install_triggers = $str($getVar('run_install_triggers',''))
#set pxe_just_once = $str($getVar('pxe_just_once',''))
#set nopxe = ""
#set saveks = ""
#set runpost = ""
#if $system_name != ''
## PXE JUST ONCE
#if $pxe_just_once in [ "1", "true", "yes", "y" ]
#if $breed == 'redhat'
#set nopxe = "\nwget \"http://%s/cblr/svc/op/nopxe/system/%s\" -O /var/log/nopxe" % (srv, system_name)
#else if $breed == 'vmware' and $os_version == 'esx4'
#set nopxe = "\ncurl \"http://%s/cblr/svc/op/nopxe/system/%s\" -o /var/log/nopxe" % (srv, system_name)
#else if $breed == 'vmware'
#set nopxe = "\nwget \"http://%s/cblr/svc/op/nopxe/system/%s\" -O /var/log/nopxe" % (srv, system_name)
#else if $breed == 'debian' or $breed == 'ubuntu'
#set nopxe = "\nwget \"http://%s/cblr/svc/op/nopxe/system/%s\" -O /var/log/nopxe" % (srv, system_name)
#else
## default to wget
#set nopxe = "wget \"http://%s/cblr/svc/op/nopxe/system/%s\" -O /var/log/nopxe;" % (srv, system_name)
#end if
#end if
## SAVE KICKSTART
#if $kickstart != ''
#if $breed == 'redhat'
#set saveks = "\nwget \"http://%s/cblr/svc/op/ks/%s/%s\" -O /root/cobbler.ks" % (srv, "system", system_name)
#else if $breed == 'vmware' and $os_version == 'esx4'
#set saveks = "\ncurl \"http://%s/cblr/svc/op/ks/%s/%s\" -o /root/cobbler.ks" % (srv, "system", system_name)
#else if $breed == 'vmware'
#set saveks = "\nwget \"http://%s/cblr/svc/op/ks/%s/%s\" -O /var/log/cobbler.ks" % (srv, "system", system_name)
#else if $breed == 'debian' or $breed == 'ubuntu'
#set saveks = "\nwget \"http://%s/cblr/svc/op/ks/%s/%s\" -O /var/log/cobbler.seed" % (srv, "system", system_name)
#end if
#end if
## RUN POST TRIGGER
#if $run_install_triggers in [ "1", "true", "yes", "y" ]
#if $breed == 'redhat'
#set runpost = "\nwget \"http://%s/cblr/svc/op/trig/mode/post/%s/%s\" -O /dev/null" % (srv, "system", system_name)
#else if $breed == 'vmware' and $os_version == 'esx4'
#set runpost = "\ncurl \"http://%s/cblr/svc/op/trig/mode/post/%s/%s\" -o /dev/null" % (srv, "system", system_name)
#else if $breed == 'vmware'
#set runpost = "\nwget \"http://%s/cblr/svc/op/trig/mode/post/%s/%s\" -O /dev/null" % (srv, "system", system_name)
#else if $breed == 'debian' or $breed == 'ubuntu'
#set runpost = "\nwget \"http://%s/cblr/svc/op/trig/mode/post/%s/%s\" -O /dev/null" % (srv, "system", system_name)
#end if
#end if
#else if $profile_name != ''
## SAVE KICKSTART
#if $kickstart != ''
#if $breed == 'redhat'
#set saveks = "\nwget \"http://%s/cblr/svc/op/ks/%s/%s\" -O /root/cobbler.ks" % (srv, "profile", profile_name)
#else if $breed == 'vmware' and $os_version == 'esx4'
#set saveks = "\ncurl \"http://%s/cblr/svc/op/ks/%s/%s\" -o /root/cobbler.ks" % (srv, "profile", profile_name)
#else if $breed == 'vmware'
#set saveks = "\nwget \"http://%s/cblr/svc/op/ks/%s/%s\" -O /var/log/cobbler.ks" % (srv, "profile", profile_name)
#else if $breed == 'debian' or $breed == 'ubuntu'
#set saveks = "\nwget \"http://%s/cblr/svc/op/ks/%s/%s\" -O /var/log/cobbler.seed" % (srv, "profile", profile_name)
#end if
#end if
## RUN POST TRIGGER
#if $run_install_triggers in [ "1", "true", "yes", "y" ]
#if $breed == 'redhat'
#set runpost = "\nwget \"http://%s/cblr/svc/op/trig/mode/post/%s/%s\" -O /dev/null" % (srv, "profile", profile_name)
#else if $breed == 'vmware' and $os_version == 'esx4'
#set runpost = "\ncurl \"http://%s/cblr/svc/op/trig/mode/post/%s/%s\" -o /dev/null" % (srv, "profile", profile_name)
#else if $breed == 'vmware'
#set runpost = "\nwget \"http://%s/cblr/svc/op/trig/mode/post/%s/%s\" -O /dev/null" % (srv, "profile", profile_name)
#else if $breed == 'debian' or $breed == 'ubuntu'
#set runpost = "\nwget \"http://%s/cblr/svc/op/trig/mode/post/%s/%s\" -O /dev/null" % (srv, "profile", profile_name)
#end if
#end if
#end if
#echo $saveks
#echo $runpost
#echo $nopxe