aboutsummaryrefslogtreecommitdiffstats
path: root/modules/bugzilla/manifests/init.pp
blob: 05153d877a16fc02d8df67e2413c3dd78eb9dc4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
class bugzilla {

   $bugzilla_location = "/usr/share/bugzilla/template/en/custom"

    package { 'bugzilla':
        ensure => installed;
    }

    package { 'perl-Test-Taint':
       ensure => installed;
    }

    package { 'perl-JSON-RPC':
      ensure => installed;
    }

    $pgsql_password = extlookup("bugzilla_pgsql",'x')
    $ldap_password = extlookup("bugzilla_ldap",'x')

    @@postgresql::user { 'bugs':
        password => $pgsql_password,
    }

    @@postgresql::database { 'bugs':
        description => "Bugzilla database",
        user => "bugs",
        require => Postgresql::User['bugs']
    }

    file { '/etc/bugzilla/localconfig':
      ensure => present,
      owner => root,
      group => apache,
      mode => 640,
      content => template("bugzilla/localconfig")
    }


    file { '/var/lib/bugzilla/params':
      ensure => present,
      owner => root,
      group => apache,
      mode => 640,
      content => template("bugzilla/params")
    }

    apache::webapp_other{"bugzilla":
        webapp_file => "bugzilla/webapp_bugzilla.conf",
    }

    $bugs_vhost = "bugs.$domain"
    $vhost_root = "/usr/share/bugzilla/www"

    apache::vhost_redirect_ssl { "$bugs_vhost": }

    apache::vhost_base { "$bugs_vhost":
        aliases => { "/bugzilla/data" => "$lib_dir/bugzilla",
                     "/bugzilla/" => $vhost_root },  
        use_ssl => true,
        location => $vhost_root,
        vhost => $bugs_vhost,
    }

    subversion::snapshot { $bugzilla_location:
      source => "svn://svn.mageia.org/svn/web/templates/bugzilla/trunk"
    }

    file { "custom":
      path => "/usr/share/bugzilla/template/en/custom",
      ensure => directory,
      owner => root,
      group => apache,
      mode => 640,
      recurse => true,
      require => Subversion::Snapshot[$bugzilla_location]
    }
}