aboutsummaryrefslogtreecommitdiffstats
path: root/modules/viewvc/manifests/init.pp
blob: 37e62e3debfdcb1b36884641b23dbbfdcd757061 (plain)
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
45
46
47
48
49
class viewvc {
    package { ['viewvc','python-svn','python-flup']:
        ensure => installed
    }
    # http_expiration_time = 600
    # svn_roots = admin: svn://svn.mageia.org/svn/adm/

    file { 'viewvc.conf':
        ensure => present,
        path => '/etc/viewvc/viewvc.conf',
        content => template('viewvc/viewvc.conf'),
        notify => Service['apache'],
        require => Package['viewvc']
    }

    file { 'webapps.d/viewvc.conf':
        ensure => present,
        path => '/etc/httpd/conf/webapps.d/viewvc.conf',
        content => template('viewvc/webapp.conf'),
        notify => Service['apache'],
        require => Package['apache'],
    }

    $kill_viewvc_path = '/usr/local/sbin/kill_viewvc'
    file { "$kill_viewvc_path":
    	ensure => present,
	mode => 755,
	owner => root,
	group => root,
	content => template('viewvc/kill_viewvc.sh'),
    }

    cron { 'kill_viewvc':
	command => "$kill_viewvc_path",
	hour => "*",
	minute => "*/5",
	user => "apache",
	environment => "MAILTO=root",
    }

    # need newer version of viewvc
    apache::vhost_base { "svnweb.$domain":
        # TODO created a full fledged type
        aliases => { "/viewvc" => "/var/www/viewvc/",
                     "/" => "/usr/share/viewvc/bin/wsgi/viewvc.fcgi/" }, 
        content => template("viewvc/vhost.conf")
    }
}