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