From ee683c7ad5cf594d3068deaea28cf24096701cb3 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Tue, 5 Apr 2011 02:07:58 +0000 Subject: move the download class to auto_installation, as it doesn't belong to libvirt module --- modules/auto_installation/manifests/download.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 modules/auto_installation/manifests/download.rb (limited to 'modules/auto_installation/manifests/download.rb') diff --git a/modules/auto_installation/manifests/download.rb b/modules/auto_installation/manifests/download.rb new file mode 100644 index 00000000..d0e6821b --- /dev/null +++ b/modules/auto_installation/manifests/download.rb @@ -0,0 +1,21 @@ +define "libvirtd::download::netboot_images", :path, :versions, :archs, :mirror_path, :files do + # example : + # mandriva : + # ftp://ftp.free.fr/pub/Distributions_Linux/MandrivaLinux/devel/%{version}/%{arch}/isolinux/alt0/ + for a in @archs do + for v in @versions do + # uncomment when ruby 1.9 will be stable and used + # mirror_file_path = @mirror_path % { :arch => a, :version => v } + mirror_file_path = @mirror_path.gsub(/%{arch}/, a) + mirror_file_path = mirror_file_path.gsub(/%{version}/, v) + for f in @files do + file_name = "#{@path}/#{@name}_#{v}_#{a}_#{f}" + create_resource(:exec, "wget -q #{mirror_file_path}/#{f} -O #{file_name}", + :creates => file_name) + end + end + end +end + + + -- cgit v1.2.1