diff options
Diffstat (limited to 'modules/buildsystem/manifests/create_upload_dir.rb')
-rw-r--r-- | modules/buildsystem/manifests/create_upload_dir.rb | 15 |
1 files changed, 8 insertions, 7 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 } |