diff options
Diffstat (limited to 'modules/buildsystem/manifests')
-rw-r--r-- | modules/buildsystem/manifests/create_upload_dir.rb | 23 | ||||
-rw-r--r-- | modules/buildsystem/manifests/init.pp | 8 |
2 files changed, 31 insertions, 0 deletions
diff --git a/modules/buildsystem/manifests/create_upload_dir.rb b/modules/buildsystem/manifests/create_upload_dir.rb new file mode 100644 index 00000000..536180e2 --- /dev/null +++ b/modules/buildsystem/manifests/create_upload_dir.rb @@ -0,0 +1,23 @@ +define "create_upload_dir", :owner do + + states = ["todo","done","failure","queue","rejected"] + releases = ["cauldron"] + repositories = ["core","nonfree","tainted"] + medias = ['release'] + + for st in states do + file [@name, st].join('/'), :ensure => 'directory', :owner => @owner + + for rel in releases do + file [@name, st, rel].join('/'), :ensure => 'directory', :owner => @owner + + for rep in repositories do + file [@name, st, rel, rep].join('/'), :ensure => 'directory', :owner => @owner + + for med in medias do + file [@name, st, rel, rep, med].join('/'), :ensure => 'directory', :owner => @owner + end + end + end + end +end diff --git a/modules/buildsystem/manifests/init.pp b/modules/buildsystem/manifests/init.pp index 2e4db826..de78e763 100644 --- a/modules/buildsystem/manifests/init.pp +++ b/modules/buildsystem/manifests/init.pp @@ -123,6 +123,14 @@ class buildsystem { owner => $sched_login, require => File[$sched_home_dir], } + + # too tedious to create everything by hand + # so I prefered to used some puppet ruby module + # the exact content and directory name should IMHO be consolidated somewhere + import "create_upload_dir.rb" + create_upload_dir { "$sched_home_dir/uploads": + owner => $sched_login, + } } class youri_submit { |