diff options
author | baigk <baiguoku@huawei.com> | 2015-08-05 02:00:31 -0400 |
---|---|---|
committer | baigk <baiguoku@huawei.com> | 2015-08-05 02:00:31 -0400 |
commit | 4fb32751f9c8e82a729780fc5dedae71cecc32b6 (patch) | |
tree | cb1af3b6eff4249874469bc567ebe6b6e0cfc4db /deploy/adapters/cobbler/snippets/kickstart_done | |
parent | d05b5f04c92034eae1675dc8102247a3cc3315f7 (diff) |
support deployment os of centos7.1 with cobbler for compass
JIRA: COMPASS-5
Change-Id: I6aa19548a17791f8862c6dba00380ef946ea3108
Signed-off-by: baigk <baiguoku@huawei.com>
Diffstat (limited to 'deploy/adapters/cobbler/snippets/kickstart_done')
-rw-r--r-- | deploy/adapters/cobbler/snippets/kickstart_done | 84 |
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 |