From 79b571dae951ba9bfe36440750c1a1408b19cd69 Mon Sep 17 00:00:00 2001 From: baigk Date: Sun, 2 Aug 2015 21:56:23 -0400 Subject: support deployment os of ubuntu 14.04 with cobbler for compass JIRA: COMPASS-3 Change-Id: I703658b04ec7ec1df4a2a3b9eac5656419d8fd9f Signed-off-by: baigk --- .../cobbler/snippets/download_config_files_deb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 deploy/adapters/cobbler/snippets/download_config_files_deb (limited to 'deploy/adapters/cobbler/snippets/download_config_files_deb') diff --git a/deploy/adapters/cobbler/snippets/download_config_files_deb b/deploy/adapters/cobbler/snippets/download_config_files_deb new file mode 100644 index 00000000..efb3a01f --- /dev/null +++ b/deploy/adapters/cobbler/snippets/download_config_files_deb @@ -0,0 +1,22 @@ +## Start download cobbler managed config files (if applicable) +#import os +#import stat +#set $cmd = '\\' +#for $tkey, $tpath in $template_files.items() + #set $orig = $tpath + #set $tpath = $tpath.replace("_","__").replace("/","_") + #if $getVar("system_name","") != "" + #set $ttype = "system" + #set $tname = $system_name + #else + #set $ttype = "profile" + #set $tname = $profile_name + #end if + #set $turl = "http://"+$http_server+"/cblr/svc/op/template/"+$ttype+"/"+$tname+"/path/"+$tpath +#if $orig.startswith("/") +#set $perms = oct(stat.S_IMODE(os.stat($tkey).st_mode))[-3:] +#set $cmd = $cmd + "\n" + "mkdir -p " + "`dirname " + $orig + "`; wget -nv " + $turl + " --output-document=" + $orig + "; chmod " + $perms +" " + $orig +"; \\" +#end if +#end for +#echo $cmd +## End download cobbler managed config files (if applicable) -- cgit 1.2.3-korg