diff options
author | Michael Scherer <misc@mageia.org> | 2011-04-05 02:07:58 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2011-04-05 02:07:58 +0000 |
commit | ee683c7ad5cf594d3068deaea28cf24096701cb3 (patch) | |
tree | d83e328972b55034230a97787913bc3c7b691c7e /modules/auto_installation/manifests | |
parent | 0e6a52030519b30b5b3c35abc39832bf59872f92 (diff) | |
download | puppet-ee683c7ad5cf594d3068deaea28cf24096701cb3.tar puppet-ee683c7ad5cf594d3068deaea28cf24096701cb3.tar.gz puppet-ee683c7ad5cf594d3068deaea28cf24096701cb3.tar.bz2 puppet-ee683c7ad5cf594d3068deaea28cf24096701cb3.tar.xz puppet-ee683c7ad5cf594d3068deaea28cf24096701cb3.zip |
move the download class to auto_installation, as it doesn't belong to libvirt module
Diffstat (limited to 'modules/auto_installation/manifests')
-rw-r--r-- | modules/auto_installation/manifests/download.rb | 21 | ||||
-rw-r--r-- | modules/auto_installation/manifests/init.pp | 4 |
2 files changed, 25 insertions, 0 deletions
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 + + + diff --git a/modules/auto_installation/manifests/init.pp b/modules/auto_installation/manifests/init.pp index 19c20680..7c5baf64 100644 --- a/modules/auto_installation/manifests/init.pp +++ b/modules/auto_installation/manifests/init.pp @@ -15,6 +15,10 @@ class auto_installation { $pxe_menu_dir = "$pxe_dir/pxelinux.cfg/m/" } + class download { + import "download.rb" + } + class pxe_menu inherits variables { package { 'syslinux': |