aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2011-07-11 23:41:07 +0000
committerNicolas Vigier <boklm@mageia.org>2011-07-11 23:41:07 +0000
commit152b77401b1b3655b32c61d2ee80dd2b75e5781b (patch)
tree2abcb82dc397530f0a01bbb48a0cec6561a1925f
parent2c995aa4f0f6f289429478490ace9f81027be125 (diff)
downloadpuppet-152b77401b1b3655b32c61d2ee80dd2b75e5781b.tar
puppet-152b77401b1b3655b32c61d2ee80dd2b75e5781b.tar.gz
puppet-152b77401b1b3655b32c61d2ee80dd2b75e5781b.tar.bz2
puppet-152b77401b1b3655b32c61d2ee80dd2b75e5781b.tar.xz
puppet-152b77401b1b3655b32c61d2ee80dd2b75e5781b.zip
add maintdb class
-rw-r--r--modules/buildsystem/manifests/init.pp41
-rwxr-xr-xmodules/buildsystem/templates/maintdb2
2 files changed, 42 insertions, 1 deletions
diff --git a/modules/buildsystem/manifests/init.pp b/modules/buildsystem/manifests/init.pp
index 850a6e75..d5cb15bf 100644
--- a/modules/buildsystem/manifests/init.pp
+++ b/modules/buildsystem/manifests/init.pp
@@ -146,6 +146,47 @@ class buildsystem {
content => template("buildsystem/upload.conf")
}
}
+
+ class maintdb {
+ $maintdb_login = "maintdb"
+ $maintdb_homedir = "/var/lib/maintdb"
+ $maintdb_dbdir = "$maintdb_homedir/$db"
+ $maintdb_binpath = "/usr/local/sbin/maintdb"
+ $maintdb_wrappath = "/usr/local/bin/wrapper.maintdb"
+
+ user {"$maintdb_login":
+ ensure => present,
+ comment => "Maintainers database",
+ managehome => true,
+ gid => $maintdb_login,
+ shell => "/bin/bash",
+ home => "$maintdb_homedir",
+ }
+
+ file { "$maintdb_dbdir":
+ ensure => directory,
+ owner => "$maintdb_login",
+ group => "$maintdb_login",
+ mode => 700,
+ require => User["$maintdb_login"],
+ }
+
+ file { "$maintdb_binpath":
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 755,
+ content => template("buildsystem/maintdb")
+ }
+
+ file { "$maintdb_wrappath":
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 755,
+ content => template("buildsystem/wrapper.maintdb")
+ }
+ }
class mgarepo {
package { 'mgarepo':
diff --git a/modules/buildsystem/templates/maintdb b/modules/buildsystem/templates/maintdb
index 7d504b77..f1f0cedc 100755
--- a/modules/buildsystem/templates/maintdb
+++ b/modules/buildsystem/templates/maintdb
@@ -1,6 +1,6 @@
#!/bin/sh
-MAINTDBDIR=/tmp/maintdb
+MAINTDBDIR="<%= $maintdb_dbdir %>"
function checkname()
{