/[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 2151 - (hide annotations) (download)
Sun Jan 8 11:20:15 2012 UTC (12 years, 3 months ago) by misc
File size: 1876 byte(s)
rename maintdb, to be able to create a subdirectory to hold the template

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     $wrappath = "/usr/local/bin/wrapper.maintdb"
9     $dump = "/var/www/bs/data/maintdb.txt"
10 misc 2144 $unmaintained = "/var/www/bs/data/unmaintained.txt"
11 misc 2137
12 misc 2139 user {"$login":
13 misc 2137 ensure => present,
14     comment => "Maintainers database",
15     managehome => true,
16     shell => "/bin/bash",
17 misc 2139 home => "$homedir",
18 misc 2137 }
19    
20 misc 2139 file { ["$homedir","$dbdir"]:
21 misc 2137 ensure => directory,
22 misc 2139 owner => "$login",
23     group => "$login",
24 misc 2137 mode => 711,
25 misc 2139 require => User["$login"],
26 misc 2137 }
27    
28 misc 2139 file { "$binpath":
29 misc 2137 mode => 755,
30 misc 2151 content => template("buildsystem/maintdb.bin")
31 misc 2137 }
32    
33 misc 2139 file { "$wrappath":
34 misc 2137 mode => 755,
35     content => template("buildsystem/wrapper.maintdb")
36     }
37    
38     sudo::sudoers_config { "maintdb":
39     content => template("buildsystem/sudoers.maintdb")
40     }
41    
42 misc 2139 file { ["$dump","$dump.new",
43     "$unmaintained","$unmaintained.new"]:
44 misc 2137 ensure => present,
45 misc 2139 owner => $login,
46 misc 2137 mode => 644,
47     require => File["/var/www/bs/data"],
48     }
49    
50     cron { "update maintdb export":
51 misc 2139 user => $login,
52     command => "$binpath root get > $dump.new; mv -f $dump.new $dump; grep ' nobody\$' $dump | sed 's/ nobody\$//' > $unmaintained.new; mv -f $unmaintained.new $unmaintained",
53 misc 2137 minute => "*/30",
54 misc 2139 require => User[$login],
55 misc 2137 }
56    
57     apache::vhost_base { "maintdb.$domain":
58 misc 2139 location => $dbdir,
59 misc 2137 content => template("buildsystem/vhost_maintdb.conf"),
60     }
61     }
62     }
63    

Properties

Name Value
svn:keywords "ID Date Rev"

  ViewVC Help
Powered by ViewVC 1.1.30