1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
class dashboard {
$dashboard_login = 'dashboard'
$dashboard_home_dir = "/var/lib/$dashboard_login"
$dashboard_dir = "$dashboard_home_dir/dashboard"
$dashboard_bindir = "$dashboard_home_dir/bin"
$dashboard_wwwdir = "/var/www/vhosts/dashboard.$::domain"
user { $dashboard_login:
comment => 'dashboard system user',
home => $dashboard_home_dir,
}
subversion::snapshot { $dashboard_dir:
source => "svn://svn.$::domain/soft/dashboard/",
}
package { 'php-cli': }
file { $dashboard_wwwdir:
ensure => directory,
owner => $dashboard_login,
group => $dashboard_login,
}
file { $dashboard_bindir:
ensure => directory,
}
file { "$dashboard_bindir/make_report":
mode => '0755',
content => template('dashboard/make_report'),
}
apache::vhost::base { "dashboard.$::domain":
location => $dashboard_wwwdir,
}
cron { 'update dashboard':
command => "$dashboard_bindir/make_report",
user => $dashboard_login,
hour => '*/2',
minute => '15',
}
}
|