diff options
Diffstat (limited to 'modules/buildsystem/manifests')
-rw-r--r-- | modules/buildsystem/manifests/create_upload_dir.rb | 15 | ||||
-rw-r--r-- | modules/buildsystem/manifests/mgarepo.pp | 2 |
2 files changed, 9 insertions, 8 deletions
diff --git a/modules/buildsystem/manifests/create_upload_dir.rb b/modules/buildsystem/manifests/create_upload_dir.rb index 43f9dc9c..dcd27afe 100644 --- a/modules/buildsystem/manifests/create_upload_dir.rb +++ b/modules/buildsystem/manifests/create_upload_dir.rb @@ -1,24 +1,25 @@ -define "buildsystem::create_upload_dir" do +hostclass "buildsystem::create_upload_dir" do states = ["todo","done","failure","queue","rejected"] owner = scope.lookupvar('buildsystem::var::scheduler::login') group = owner + uploads_dir = scope.lookupvar('buildsystem::var::scheduler::homedir') + '/uploads' - file @name, :ensure => 'directory', :owner => owner, :group => group + file uploads_dir, :ensure => 'directory', :owner => owner, :group => group for st in states do - file [@name, st].join('/'), :ensure => 'directory', :owner => owner, :group => group + file [uploads_dir, st].join('/'), :ensure => 'directory', :owner => owner, :group => group scope.lookupvar('buildsystem::mgarepo::releases').each{|rel, repositories| - file [@name, st, rel].join('/'), :ensure => 'directory', :owner => owner, :group => group + file [uploads_dir, st, rel].join('/'), :ensure => 'directory', :owner => owner, :group => group repositories.each{|rep, medias| - file [@name, st, rel, rep].join('/'), :ensure => 'directory', :owner => owner, :group => group + file [uploads_dir, st, rel, rep].join('/'), :ensure => 'directory', :owner => owner, :group => group for med in medias do if st == 'done' - file [@name, st, rel, rep, med].join('/'), :ensure => 'directory', :owner => owner, :group => group, :mode => 0775 + file [uploads_dir, st, rel, rep, med].join('/'), :ensure => 'directory', :owner => owner, :group => group, :mode => 0775 else - file [@name, st, rel, rep, med].join('/'), :ensure => 'directory', :owner => owner, :group => group + file [uploads_dir, st, rel, rep, med].join('/'), :ensure => 'directory', :owner => owner, :group => group end end } diff --git a/modules/buildsystem/manifests/mgarepo.pp b/modules/buildsystem/manifests/mgarepo.pp index e0b714c5..6078ee51 100644 --- a/modules/buildsystem/manifests/mgarepo.pp +++ b/modules/buildsystem/manifests/mgarepo.pp @@ -57,7 +57,7 @@ class buildsystem::mgarepo { }, } - create_upload_dir { "$sched_home_dir/uploads": } + include buildsystem::create_upload_dir tidy { "$sched_home_dir/uploads": type => 'ctime', |