aboutsummaryrefslogtreecommitdiffstats
path: root/modules/buildsystem/manifests/distros.rb
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-05-23 15:05:28 +0000
committerNicolas Vigier <boklm@mageia.org>2013-05-23 15:05:28 +0000
commit98fa28e23cbd8ac75e428b1bee6b89cdbbe0d5bf (patch)
tree0aa24b1f9c790ad0e484f9cb52176623011e51b3 /modules/buildsystem/manifests/distros.rb
parent64099eaa3dd3b6d42f30355f4ae11abdbe1e280f (diff)
downloadpuppet-98fa28e23cbd8ac75e428b1bee6b89cdbbe0d5bf.tar
puppet-98fa28e23cbd8ac75e428b1bee6b89cdbbe0d5bf.tar.gz
puppet-98fa28e23cbd8ac75e428b1bee6b89cdbbe0d5bf.tar.bz2
puppet-98fa28e23cbd8ac75e428b1bee6b89cdbbe0d5bf.tar.xz
puppet-98fa28e23cbd8ac75e428b1bee6b89cdbbe0d5bf.zip
buildsystem: use common media.cfg template for all distros
The media.cfg file is now generated for all distributions now (it was only done for cauldron before). The media.cfg file is generated using the infos about the distributions and medias from the $distro parameter in buildsystem::var::distros.
Diffstat (limited to 'modules/buildsystem/manifests/distros.rb')
-rw-r--r--modules/buildsystem/manifests/distros.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/buildsystem/manifests/distros.rb b/modules/buildsystem/manifests/distros.rb
index 6ecc7240..24b394aa 100644
--- a/modules/buildsystem/manifests/distros.rb
+++ b/modules/buildsystem/manifests/distros.rb
@@ -10,6 +10,13 @@ hostclass "buildsystem::distros" do
file [ bootstrap_reporoot, rel ].join('/'), :ensure => 'directory',
:owner => mirror_user, :group => mirror_user
for arch in distro['arch'] do
+ # As ruby dsl cannot use defined resources, we have to use a
+ # workaround with 'find_resource_type' as described in this
+ # puppet issue: http://projects.puppetlabs.com/issues/11912
+ scope.find_resource_type 'buildsystem::media_cfg'
+ create_resource 'buildsystem::media_cfg',
+ [ rel, ' ', arch ].join('/'), :distro_name => rel,
+ :arch => arch
file [ bootstrap_reporoot, rel, arch ].join('/'),
:ensure => 'directory', :owner => mirror_user,
:group => mirror_user