1 |
class viewvc { |
2 |
include apache::mod::fastcgi |
3 |
include viewvc::var |
4 |
package {['viewvc', |
5 |
'python-svn', |
6 |
'python-flup']: } |
7 |
|
8 |
# http_expiration_time = 600 |
9 |
# svn_roots = admin: svn://svn.mageia.org/svn/adm/ |
10 |
|
11 |
file { '/etc/viewvc/viewvc.conf': |
12 |
content => template($viewvc::var::tmpl_viewvc_conf), |
13 |
notify => Service['apache'], |
14 |
require => Package['viewvc'], |
15 |
} |
16 |
|
17 |
apache::webapp_other { 'viewvc': |
18 |
webapp_file => 'viewvc/webapp.conf', |
19 |
} |
20 |
|
21 |
mga_common::local_script { 'kill_viewvc': |
22 |
content => template('viewvc/kill_viewvc.sh'), |
23 |
} |
24 |
|
25 |
cron { 'kill_viewvc': |
26 |
command => '/usr/local/bin/kill_viewvc', |
27 |
hour => '*', |
28 |
minute => '*/5', |
29 |
user => 'apache', |
30 |
environment => 'MAILTO=root', |
31 |
} |
32 |
|
33 |
$robotsfile = '/var/www/viewvc/robots.txt' |
34 |
file { $robotsfile: |
35 |
ensure => present, |
36 |
mode => 0644, |
37 |
owner => root, |
38 |
group => root, |
39 |
source => 'puppet:///modules/viewvc/robots.txt', |
40 |
} |
41 |
|
42 |
apache::vhost::base { $viewvc::var::hostname: |
43 |
aliases => {'/viewvc' => '/var/www/viewvc/', |
44 |
'/robots.txt' => $robotsfile, |
45 |
'/' => '/usr/share/viewvc/bin/wsgi/viewvc.fcgi/'}, |
46 |
content => template('viewvc/vhost.conf'), |
47 |
} |
48 |
} |
49 |
|