/[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 3254 - (show annotations) (download)
Wed Jun 19 19:15:59 2013 UTC (10 years, 9 months ago) by boklm
File size: 2151 byte(s)
Rename mga-common module to mga_common.

New puppet version doesn't like modules with a - in their name.
1 class buildsystem::maintdb {
2 include buildsystem::var::maintdb
3 include buildsystem::var::groups
4 include buildsystem::var::webstatus
5 include sudo
6
7 user { $buildsystem::var::maintdb::login:
8 comment => 'Maintainers database',
9 home => $buildsystem::var::maintdb::homedir,
10 }
11
12 file { [$buildsystem::var::maintdb::homedir,$buildsystem::var::maintdb::dbdir]:
13 ensure => directory,
14 owner => $buildsystem::var::maintdb::login,
15 group => $buildsystem::var::maintdb::login,
16 mode => '0711',
17 require => User[$buildsystem::var::maintdb::login],
18 }
19
20 file { $buildsystem::var::maintdb::binpath:
21 mode => '0755',
22 content => template('buildsystem/maintdb/maintdb.bin')
23 }
24
25 mga_common::local_script { 'wrapper.maintdb':
26 content => template('buildsystem/maintdb/wrapper.maintdb')
27 }
28
29 sudo::sudoers_config { 'maintdb':
30 content => template('buildsystem/maintdb/sudoers.maintdb')
31 }
32
33 file { [$buildsystem::var::maintdb::dump,
34 "${buildsystem::var::maintdb::dump}.new",
35 $buildsystem::var::maintdb::unmaintained,
36 "${buildsystem::var::maintdb::unmaintained}.new"]:
37 owner => $buildsystem::var::maintdb::login,
38 require => File["${buildsystem::var::webstatus::location}/data"],
39 }
40
41 cron { 'update maintdb export':
42 user => $buildsystem::var::maintdb::login,
43 command => "${buildsystem::var::maintdb::binpath} root get > ${buildsystem::var::maintdb::dump}.new; cp -f ${buildsystem::var::maintdb::dump}.new ${buildsystem::var::maintdb::dump}; grep ' nobody\$' ${buildsystem::var::maintdb::dump} | sed 's/ nobody\$//' > ${buildsystem::var::maintdb::unmaintained}.new; cp -f ${buildsystem::var::maintdb::unmaintained}.new ${buildsystem::var::maintdb::unmaintained}",
44 minute => '*/30',
45 require => User[$buildsystem::var::maintdb::login],
46 }
47
48 apache::vhost::base { $buildsystem::var::maintdb::hostname:
49 location => $buildsystem::var::maintdb::dbdir,
50 content => template('buildsystem/maintdb/vhost_maintdb.conf'),
51 }
52 }

Properties

Name Value
svn:keywords "ID Date Rev"

  ViewVC Help
Powered by ViewVC 1.1.30