/[adm]/puppet/modules/dashboard/manifests/init.pp
ViewVC logotype

Contents of /puppet/modules/dashboard/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1785 - (show annotations) (download)
Tue Jun 21 12:31:03 2011 UTC (12 years, 10 months ago) by boklm
File size: 1402 byte(s)
only update dashboard one time every two hours (not every minutes)
1 class dashboard {
2 class variable {
3 $dashboard_login = "dashboard"
4 $dashboard_home_dir = "/var/lib/$dashboard_login"
5 $dashboard_dir = "$dashboard_home_dir/dashboard"
6 $dashboard_bindir = "$dashboard_home_dir/bin"
7 $dashboard_wwwdir = "/var/www/vhosts/dashboard.$domain"
8 }
9
10 class base inherits variable {
11 user {"$dashboard_login":
12 ensure => present,
13 comment => "dashboard system user",
14 managehome => true,
15 home => $dashboard_home_dir,
16 shell => "/bin/bash",
17 }
18
19 subversion::snapshot { $dashboard_dir:
20 source => "svn://svn.$domain/soft/dashboard/",
21 }
22
23 package { "php-cli":
24 ensure => 'installed',
25 }
26
27 file { $dashboard_wwwdir:
28 ensure => directory,
29 owner => $dashboard_login,
30 group => $dashboard_login,
31 mode => 755,
32 }
33
34 file { $dashboard_bindir:
35 ensure => directory,
36 owner => root,
37 group => root,
38 mode => 755,
39 }
40
41 file { "$dashboard_bindir/make_report":
42 ensure => present,
43 owner => root,
44 group => root,
45 mode => 755,
46 content => template('dashboard/make_report'),
47 }
48
49 apache::vhost_base { "dashboard.$domain":
50 location => $dashboard_wwwdir,
51 }
52
53 cron { "update dashboard":
54 command => "$dashboard_bindir/make_report",
55 user => $dashboard_login,
56 hour => "*/2",
57 minute => '15',
58 }
59 }
60 }

  ViewVC Help
Powered by ViewVC 1.1.30