diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-05-23 15:07:15 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-05-23 15:07:15 +0000 |
commit | 581bd6f082cd82e993b34f2b5d7fa3b3b14b9927 (patch) | |
tree | 44be8e49bdd47e7cd2d4768fb89cb48f07f764c1 /modules/buildsystem/manifests/distros.rb | |
parent | 055358fdd446ad1b852674fb81f7f65c51f72cf0 (diff) | |
download | puppet-581bd6f082cd82e993b34f2b5d7fa3b3b14b9927.tar puppet-581bd6f082cd82e993b34f2b5d7fa3b3b14b9927.tar.gz puppet-581bd6f082cd82e993b34f2b5d7fa3b3b14b9927.tar.bz2 puppet-581bd6f082cd82e993b34f2b5d7fa3b3b14b9927.tar.xz puppet-581bd6f082cd82e993b34f2b5d7fa3b3b14b9927.zip |
buildsystem::var::distros: add tmpl_media.cfg
It is now possible to specify a different template file for media.cfg
for each distribution, using the 'tmpl_media.cfg' option in the distros
variable from buildsystem::Var::distros. If the option is not set, the
default template (buildsystem/media.cfg) is used.
Diffstat (limited to 'modules/buildsystem/manifests/distros.rb')
-rw-r--r-- | modules/buildsystem/manifests/distros.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/buildsystem/manifests/distros.rb b/modules/buildsystem/manifests/distros.rb index 22e529eb..4dc5f2b6 100644 --- a/modules/buildsystem/manifests/distros.rb +++ b/modules/buildsystem/manifests/distros.rb @@ -14,9 +14,15 @@ hostclass "buildsystem::distros" do # workaround with 'find_resource_type' as described in this # puppet issue: http://projects.puppetlabs.com/issues/11912 scope.find_resource_type 'buildsystem::media_cfg' + media_cfg_args = { + :distro_name => rel, + :arch => arch, + } + if distro['tmpl_media.cfg'] != nil + media_cfg_args['templatefile'] = distro['tmpl_media.cfg'] + end create_resource 'buildsystem::media_cfg', - [ rel, ' ', arch ].join('/'), :distro_name => rel, - :arch => arch + [ rel, ' ', arch ].join('/'), media_cfg_args file [ bootstrap_reporoot, rel, arch ].join('/'), :ensure => 'directory', :owner => mirror_user, :group => mirror_user |