summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/cobbler/snippets/kickstart_done
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/cobbler/snippets/kickstart_done')
-rw-r--r--deploy/adapters/cobbler/snippets/kickstart_done84
1 files changed, 84 insertions, 0 deletions
diff --git a/deploy/adapters/cobbler/snippets/kickstart_done b/deploy/adapters/cobbler/snippets/kickstart_done
new file mode 100644
index 00000000..2a936adb
--- /dev/null
+++ b/deploy/adapters/cobbler/snippets/kickstart_done
@@ -0,0 +1,84 @@
+#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