aboutsummaryrefslogtreecommitdiffstats
path: root/modules/buildsystem/manifests/webstatus.pp
blob: 41538dd9147f28dc8676c3541cc4533c47afc8fe (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
class buildsystem::webstatus {
    include buildsystem::var::webstatus
    include buildsystem::var::scheduler
    include apache::mod::php

    file { [ $buildsystem::var::webstatus::location, "${buildsystem::var::webstatus::location}/data" ]:
        ensure => directory,
    }

    $vhost = $buildsystem::var::webstatus::hostname
    apache::vhost::base { $vhost:
        aliases  => {
            '/uploads' => "${buildsystem::var::scheduler::homedir}/uploads",
            '/autobuild/cauldron/x86_64/core/log/status.core.log' => "${buildsystem::var::webstatus::location}/autobuild/broken.php",
	    '/themes' => $buildsystem::var::webstatus::themes_dir,
        },
        location => $buildsystem::var::webstatus::location,
        content  => template('buildsystem/vhost_webstatus.conf'),
    }

    apache::vhost::base { "ssl_${vhost}":
        vhost    => $vhost,
        use_ssl  => true,
        aliases  => {
            '/uploads' => "${buildsystem::var::scheduler::homedir}/uploads",
            '/autobuild/cauldron/x86_64/core/log/status.core.log' => "${buildsystem::var::webstatus::location}/autobuild/broken.php",
	    '/themes' => $buildsystem::var::webstatus::themes_dir,
        },
        location => $buildsystem::var::webstatus::location,
        content  => template('buildsystem/vhost_webstatus.conf'),
    }

    git::snapshot { $buildsystem::var::webstatus::location:
        source => $buildsystem::var::webstatus::git_url,
    }

    file { '/etc/bs-webstatus.conf':
	ensure => present,
	content => template('buildsystem/bs-webstatus.conf'),
	mode => 0644,
	owner => root,
	group => root,
    }
}