From 152b77401b1b3655b32c61d2ee80dd2b75e5781b Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Mon, 11 Jul 2011 23:41:07 +0000 Subject: add maintdb class --- modules/buildsystem/manifests/init.pp | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'modules/buildsystem/manifests/init.pp') 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': -- cgit v1.2.1