aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2012-01-07 22:06:42 +0000
committerMichael Scherer <misc@mageia.org>2012-01-07 22:06:42 +0000
commitc9cff227942d30e459f58e8baa6d09d99685109d (patch)
tree7f72b87ffa2fd3ba3c5e2c6ceec94fc237a8b77d /modules
parent1494c1f56ab58dfd0a71d5a8de2f74785f4e4c4d (diff)
downloadpuppet-c9cff227942d30e459f58e8baa6d09d99685109d.tar
puppet-c9cff227942d30e459f58e8baa6d09d99685109d.tar.gz
puppet-c9cff227942d30e459f58e8baa6d09d99685109d.tar.bz2
puppet-c9cff227942d30e459f58e8baa6d09d99685109d.tar.xz
puppet-c9cff227942d30e459f58e8baa6d09d99685109d.zip
split mgarepo in a separate file
Diffstat (limited to 'modules')
-rw-r--r--modules/buildsystem/manifests/init.pp76
-rw-r--r--modules/buildsystem/manifests/mgarepo.pp71
2 files changed, 72 insertions, 75 deletions
diff --git a/modules/buildsystem/manifests/init.pp b/modules/buildsystem/manifests/init.pp
index 9ba4886c..227037b4 100644
--- a/modules/buildsystem/manifests/init.pp
+++ b/modules/buildsystem/manifests/init.pp
@@ -86,7 +86,7 @@ class buildsystem {
include scheduler
include gatherer
- include mgarepo
+ include buildsystem::mgarepo
include youri_submit
include buildsystem::check_missing_deps
include signbot
@@ -287,80 +287,6 @@ class buildsystem {
}
}
- class mgarepo {
- package { 'mgarepo':
-
- }
-
- package { 'rpm-build':
- }
-
- file { "mgarepo.conf":
- path => "/etc/mgarepo.conf",
- owner => root,
- group => root,
- mode => 644,
- content => template("buildsystem/mgarepo.conf")
- }
-
- file { "repsys.conf":
- path => "/etc/repsys.conf",
- owner => root,
- group => root,
- mode => 644,
- content => template("buildsystem/mgarepo.conf")
- }
-
- file { "$packages_archivedir":
- ensure => "directory",
- owner => $sched_login,
- require => File[$sched_home_dir],
- }
-
- file { "$sched_home_dir/repsys":
- ensure => "directory",
- owner => $sched_login,
- require => File[$sched_home_dir],
- }
-
- file { ["$sched_home_dir/repsys/tmp", "$sched_home_dir/repsys/srpms"]:
- ensure => "directory",
- owner => $sched_login,
- group => "mga-packagers",
- mode => 1775,
- require => File["$sched_home_dir/repsys"],
- }
-
- # FIXME: disabled temporarly as upload dir is a symlink to /var/lib/repsys/uploads
- #file { "$sched_home_dir/uploads":
- # ensure => "directory",
- # 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,
- group => $sched_login,
- }
-
- tidy { "$sched_home_dir/uploads":
- age => "2w",
- recurse => true,
- type => "ctime",
- }
-
- tidy { "$packages_archivedir":
- age => "1w",
- matches => "*.rpm",
- recurse => true,
- type => "ctime",
- }
- }
-
class youri_submit {
include sudo
diff --git a/modules/buildsystem/manifests/mgarepo.pp b/modules/buildsystem/manifests/mgarepo.pp
new file mode 100644
index 00000000..1c603514
--- /dev/null
+++ b/modules/buildsystem/manifests/mgarepo.pp
@@ -0,0 +1,71 @@
+class buildsystem {
+ class mgarepo {
+ package { ['mgarepo','rpm-build']: }
+
+ file { "mgarepo.conf":
+ path => "/etc/mgarepo.conf",
+ owner => root,
+ group => root,
+ mode => 644,
+ content => template("buildsystem/mgarepo.conf")
+ }
+
+ file { "repsys.conf":
+ path => "/etc/repsys.conf",
+ owner => root,
+ group => root,
+ mode => 644,
+ content => template("buildsystem/mgarepo.conf")
+ }
+
+ file { "$packages_archivedir":
+ ensure => "directory",
+ owner => $sched_login,
+ require => File[$sched_home_dir],
+ }
+
+ file { "$sched_home_dir/repsys":
+ ensure => "directory",
+ owner => $sched_login,
+ require => File[$sched_home_dir],
+ }
+
+ file { ["$sched_home_dir/repsys/tmp", "$sched_home_dir/repsys/srpms"]:
+ ensure => "directory",
+ owner => $sched_login,
+ group => "mga-packagers",
+ mode => 1775,
+ require => File["$sched_home_dir/repsys"],
+ }
+
+ # FIXME: disabled temporarly as upload dir is a symlink to /var/lib/repsys/uploads
+ #file { "$sched_home_dir/uploads":
+ # ensure => "directory",
+ # 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,
+ group => $sched_login,
+ }
+
+ tidy { "$sched_home_dir/uploads":
+ age => "2w",
+ recurse => true,
+ type => "ctime",
+ }
+
+ tidy { "$packages_archivedir":
+ age => "1w",
+ matches => "*.rpm",
+ recurse => true,
+ type => "ctime",
+ }
+ }
+}
+