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