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::user { 'bugs': |
21 |
password => $pgsql_password, |
22 |
} |
23 |
|
24 |
@@postgresql::database { 'bugs': |
25 |
description => "Bugzilla database", |
26 |
user => "bugs", |
27 |
require => Postgresql::User['bugs'] |
28 |
} |
29 |
|
30 |
file { '/etc/bugzilla/localconfig': |
31 |
ensure => present, |
32 |
owner => root, |
33 |
group => apache, |
34 |
mode => 640, |
35 |
content => template("bugzilla/localconfig") |
36 |
} |
37 |
|
38 |
|
39 |
file { '/var/lib/bugzilla/params': |
40 |
ensure => present, |
41 |
owner => root, |
42 |
group => apache, |
43 |
mode => 640, |
44 |
content => template("bugzilla/params") |
45 |
} |
46 |
|
47 |
apache::webapp_other{"bugzilla": |
48 |
webapp_file => "bugzilla/webapp_bugzilla.conf", |
49 |
} |
50 |
|
51 |
apache::vhost_other_app { "bugs.$domain": |
52 |
vhost_file => "bugzilla/vhost_bugs.conf", |
53 |
} |
54 |
subversion::snapshot { $bugzilla_location: |
55 |
source => "svn://svn.mageia.org/svn/web/templates/bugzilla/trunk" |
56 |
} |
57 |
|
58 |
file { "custom": |
59 |
path => "/usr/share/bugzilla/template/en/custom", |
60 |
ensure => directory, |
61 |
owner => root, |
62 |
group => apache, |
63 |
mode => 640, |
64 |
recurse => true, |
65 |
require => Subversion::Snapshot[$bugzilla_location] |
66 |
} |
67 |
} |