aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2012-01-07 22:06:45 +0000
committerMichael Scherer <misc@mageia.org>2012-01-07 22:06:45 +0000
commitd2672e1d60cd3a439ae8d6eb698f346b49fd3135 (patch)
tree7ebaae35822ed8b18decd85b796d3fc8046e8141 /modules
parent917146508bd63bca55f3e89515715a08e3c2b640 (diff)
downloadpuppet-d2672e1d60cd3a439ae8d6eb698f346b49fd3135.tar
puppet-d2672e1d60cd3a439ae8d6eb698f346b49fd3135.tar.gz
puppet-d2672e1d60cd3a439ae8d6eb698f346b49fd3135.tar.bz2
puppet-d2672e1d60cd3a439ae8d6eb698f346b49fd3135.tar.xz
puppet-d2672e1d60cd3a439ae8d6eb698f346b49fd3135.zip
split signbot from the main module
Diffstat (limited to 'modules')
-rw-r--r--modules/buildsystem/manifests/init.pp44
-rw-r--r--modules/buildsystem/manifests/signbot.pp47
2 files changed, 48 insertions, 43 deletions
diff --git a/modules/buildsystem/manifests/init.pp b/modules/buildsystem/manifests/init.pp
index 227037b4..b3deca06 100644
--- a/modules/buildsystem/manifests/init.pp
+++ b/modules/buildsystem/manifests/init.pp
@@ -6,11 +6,6 @@ class buildsystem {
$sched_login = "schedbot"
$sched_home_dir = "/var/lib/$sched_login"
$packages_archivedir = "$sched_home_dir/old"
- $sign_login = "signbot"
- $sign_home_dir = "/var/lib/$sign_login"
- $sign_keydir = "$sign_home_dir/keys"
- # FIXME: maybe keyid should be defined at an other place
- $sign_keyid = "80420F66"
$repository_root = "/distrib/bootstrap"
$mirror_root = "/distrib/mirror"
$packagers_group = 'mga-packagers'
@@ -89,50 +84,13 @@ class buildsystem {
include buildsystem::mgarepo
include youri_submit
include buildsystem::check_missing_deps
- include signbot
+ include buildsystem::signbot
}
class buildnode inherits base {
include iurt
}
- class signbot {
- sshuser { $sign_login:
- homedir => $sign_home_dir,
- comment => "System user used to sign packages",
- groups => [$sched_login],
- }
-
- gnupg::keys{"packages":
- email => "packages@$domain",
- #FIXME there should be a variable somewhere to change the name of the distribution
- key_name => 'Mageia Packages',
- login => $sign_login,
- batchdir => "$sign_home_dir/batches",
- keydir => $sign_keydir,
- }
-
- sudo::sudoers_config { "signpackage":
- content => template("buildsystem/sudoers.signpackage")
- }
-
- file { "$sign_home_dir/.rpmmacros":
- ensure => present,
- owner => root,
- group => root,
- mode => 644,
- content => template("buildsystem/signbot-rpmmacros")
- }
-
- file { "/usr/local/bin/sign-check-package":
- ensure => present,
- owner => root,
- group => root,
- mode => 755,
- content => template("buildsystem/sign-check-package")
- }
- }
-
class scheduler {
# ulri
include iurtupload
diff --git a/modules/buildsystem/manifests/signbot.pp b/modules/buildsystem/manifests/signbot.pp
new file mode 100644
index 00000000..576a49c0
--- /dev/null
+++ b/modules/buildsystem/manifests/signbot.pp
@@ -0,0 +1,47 @@
+class buildsystem {
+ class signbot {
+ $sign_login = "signbot"
+ $sign_home_dir = "/var/lib/$sign_login"
+ $sign_keydir = "$sign_home_dir/keys"
+ # FIXME: maybe keyid should be defined at an other place
+ $sign_keyid = "80420F66"
+ # FIXME refactor with base class ( once variables are placed in a separate module )
+ $sched_login = "schedbot"
+
+ sshuser { $sign_login:
+ homedir => $sign_home_dir,
+ comment => "System user used to sign packages",
+ groups => [$sched_login],
+ }
+
+ gnupg::keys{"packages":
+ email => "packages@$domain",
+ #FIXME there should be a variable somewhere to change the name of the distribution
+ key_name => 'Mageia Packages',
+ login => $sign_login,
+ batchdir => "$sign_home_dir/batches",
+ keydir => $sign_keydir,
+ }
+
+ sudo::sudoers_config { "signpackage":
+ content => template("buildsystem/sudoers.signpackage")
+ }
+
+ file { "$sign_home_dir/.rpmmacros":
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 644,
+ content => template("buildsystem/signbot-rpmmacros")
+ }
+
+ file { "/usr/local/bin/sign-check-package":
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 755,
+ content => template("buildsystem/sign-check-package")
+ }
+ }
+}
+