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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2158 - (hide annotations) (download)
Sun Jan 8 13:11:49 2012 UTC (12 years, 3 months ago) by misc
File size: 1844 byte(s)
use cp instead of mv, since mv would requires to be able to write in /var/www/bs/data,
and since permission are set to 755, this doesn't work.
1 misc 2137 class buildsystem {
2 misc 2138 class maintdb {
3 misc 2137 include sudo
4 misc 2139 $login = "maintdb"
5     $homedir = "/var/lib/maintdb"
6 misc 2144 $dbdir = "$homedir/db"
7 misc 2139 $binpath = "/usr/local/sbin/maintdb"
8     $dump = "/var/www/bs/data/maintdb.txt"
9 misc 2144 $unmaintained = "/var/www/bs/data/unmaintained.txt"
10 misc 2137
11 misc 2139 user {"$login":
12 misc 2137 ensure => present,
13     comment => "Maintainers database",
14     managehome => true,
15     shell => "/bin/bash",
16 misc 2139 home => "$homedir",
17 misc 2137 }
18    
19 misc 2139 file { ["$homedir","$dbdir"]:
20 misc 2137 ensure => directory,
21 misc 2139 owner => "$login",
22     group => "$login",
23 misc 2137 mode => 711,
24 misc 2139 require => User["$login"],
25 misc 2137 }
26    
27 misc 2139 file { "$binpath":
28 misc 2137 mode => 755,
29 misc 2153 content => template("buildsystem/maintdb/maintdb.bin")
30 misc 2137 }
31    
32 misc 2157 local_script { "wrapper.maintdb":
33 misc 2153 content => template("buildsystem/maintdb/wrapper.maintdb")
34 misc 2137 }
35    
36     sudo::sudoers_config { "maintdb":
37 misc 2153 content => template("buildsystem/maintdb/sudoers.maintdb")
38 misc 2137 }
39    
40 misc 2139 file { ["$dump","$dump.new",
41     "$unmaintained","$unmaintained.new"]:
42 misc 2137 ensure => present,
43 misc 2139 owner => $login,
44 misc 2137 mode => 644,
45     require => File["/var/www/bs/data"],
46     }
47    
48     cron { "update maintdb export":
49 misc 2139 user => $login,
50 misc 2158 command => "$binpath root get > $dump.new; cp -f $dump.new $dump; grep ' nobody\$' $dump | sed 's/ nobody\$//' > $unmaintained.new; cp -f $unmaintained.new $unmaintained",
51 misc 2137 minute => "*/30",
52 misc 2139 require => User[$login],
53 misc 2137 }
54    
55     apache::vhost_base { "maintdb.$domain":
56 misc 2139 location => $dbdir,
57 misc 2153 content => template("buildsystem/maintdb/vhost_maintdb.conf"),
58 misc 2137 }
59     }
60     }
61    

Properties

Name Value
svn:keywords "ID Date Rev"

  ViewVC Help
Powered by ViewVC 1.1.30