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