1 |
class bugzilla { |
2 |
|
3 |
$bugzilla_location = "/usr/share/bugzilla/template/en/custom" |
4 |
|
5 |
package { ['bugzilla', |
6 |
'graphviz', |
7 |
'perl-Test-Taint', |
8 |
'perl-JSON-RPC']: } |
9 |
|
10 |
$pgsql_password = extlookup("bugzilla_pgsql",'x') |
11 |
$ldap_password = extlookup("bugzilla_ldap",'x') |
12 |
|
13 |
postgresql::remote_db_and_user { 'bugs': |
14 |
description => "Bugzilla database", |
15 |
password => $pgsql_password, |
16 |
} |
17 |
|
18 |
file { '/etc/bugzilla/localconfig': |
19 |
group => apache, |
20 |
mode => 640, |
21 |
content => template("bugzilla/localconfig"), |
22 |
require => Package[bugzilla], |
23 |
} |
24 |
|
25 |
|
26 |
file { '/var/lib/bugzilla/params': |
27 |
group => apache, |
28 |
mode => 640, |
29 |
content => template("bugzilla/params"), |
30 |
require => Package[bugzilla], |
31 |
} |
32 |
|
33 |
apache::webapp_other{"bugzilla": |
34 |
webapp_file => "bugzilla/webapp_bugzilla.conf", |
35 |
} |
36 |
|
37 |
$bugs_vhost = "bugs.$domain" |
38 |
$vhost_root = "/usr/share/bugzilla/www" |
39 |
|
40 |
apache::vhost_redirect_ssl { "$bugs_vhost": } |
41 |
|
42 |
apache::vhost_base { "$bugs_vhost": |
43 |
aliases => { "/bugzilla/" => $vhost_root }, |
44 |
use_ssl => true, |
45 |
location => $vhost_root, |
46 |
vhost => $bugs_vhost, |
47 |
} |
48 |
|
49 |
subversion::snapshot { $bugzilla_location: |
50 |
source => "svn://svn.mageia.org/svn/web/templates/bugzilla/trunk", |
51 |
require => Package[bugzilla], |
52 |
} |
53 |
|
54 |
file { "custom": |
55 |
path => "/usr/share/bugzilla/template/en/custom", |
56 |
ensure => directory, |
57 |
group => apache, |
58 |
mode => 640, |
59 |
recurse => true, |
60 |
require => Subversion::Snapshot[$bugzilla_location], |
61 |
} |
62 |
} |