/[adm]/puppet/modules/buildsystem/manifests/maintdb.pp
ViewVC logotype

Contents of /puppet/modules/buildsystem/manifests/maintdb.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2138 - (show annotations) (download)
Sat Jan 7 23:19:15 2012 UTC (12 years, 3 months ago) by misc
File size: 2344 byte(s)
no longer inherit from base ( not needed )
1 class buildsystem {
2 class maintdb {
3 include sudo
4 $maintdb_login = "maintdb"
5 $maintdb_homedir = "/var/lib/maintdb"
6 $maintdb_dbdir = "$maintdb_homedir/db"
7 $maintdb_binpath = "/usr/local/sbin/maintdb"
8 $maintdb_wrappath = "/usr/local/bin/wrapper.maintdb"
9 $maintdb_dump = "/var/www/bs/data/maintdb.txt"
10 $maintdb_unmaintained = "/var/www/bs/data/unmaintained.txt"
11
12 user {"$maintdb_login":
13 ensure => present,
14 comment => "Maintainers database",
15 managehome => true,
16 shell => "/bin/bash",
17 home => "$maintdb_homedir",
18 }
19
20 file { "$maintdb_homedir":
21 ensure => directory,
22 owner => "$maintdb_login",
23 group => "$maintdb_login",
24 mode => 711,
25 require => User["$maintdb_login"],
26 }
27
28 file { "$maintdb_dbdir":
29 ensure => directory,
30 owner => "$maintdb_login",
31 group => "$maintdb_login",
32 mode => 711,
33 require => User["$maintdb_login"],
34 }
35
36 file { "$maintdb_binpath":
37 mode => 755,
38 content => template("buildsystem/maintdb")
39 }
40
41 file { "$maintdb_wrappath":
42 mode => 755,
43 content => template("buildsystem/wrapper.maintdb")
44 }
45
46 sudo::sudoers_config { "maintdb":
47 content => template("buildsystem/sudoers.maintdb")
48 }
49
50 file { ["$maintdb_dump","$maintdb_dump.new",
51 "$maintdb_unmaintained","$maintdb_unmaintained.new"]:
52 ensure => present,
53 owner => $maintdb_login,
54 mode => 644,
55 require => File["/var/www/bs/data"],
56 }
57
58 cron { "update maintdb export":
59 user => $maintdb_login,
60 command => "$maintdb_binpath root get > $maintdb_dump.new; mv -f $maintdb_dump.new $maintdb_dump; grep ' nobody\$' $maintdb_dump | sed 's/ nobody\$//' > $maintdb_unmaintained.new; mv -f $maintdb_unmaintained.new $maintdb_unmaintained",
61 minute => "*/30",
62 require => User[$maintdb_login],
63 }
64
65 apache::vhost_base { "maintdb.$domain":
66 location => $maintdb_dbdir,
67 content => template("buildsystem/vhost_maintdb.conf"),
68 }
69 }
70 }
71

Properties

Name Value
svn:keywords "ID Date Rev"

  ViewVC Help
Powered by ViewVC 1.1.30