aboutsummaryrefslogtreecommitdiffstats
path: root/modules/bugzilla-dev/manifests/init.pp
blob: da59ffe76caad4e2eac944c94099969342c653e5 (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
78
79
80
81
class bugzilla-dev {

    $bugzilla_dev_location = '/usr/share/bugzilla/'

    package {['graphviz',
              'perl-Template-GD', # needed for graphical_report support
              'perl-Test-Taint',
              'perl-JSON-RPC',
              'perl-Email-MIME',
              'perl-Email-Sender',
              'Math-Random-ISAAC',
              'perl-Chart',
              'perl-PatchReader',
              'perl-ldap',
              'perl-SOAP-Lite',
              'perl-XMLRPC-Lite']: }

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

    postgresql::remote_db_and_user { 'bugs':
        description => 'Bugzilla database',
        password    => $pgsql_password,
    }

    file { '/usr/share/bugzilla/localconfig':
      group   => 'apache',
      mode    => '0640',
      content => template('bugzilla-dev/localconfig')
    }


    file { '/usr/share/bugzilla/data/params':
      group   => 'apache',
      mode    => '0640',
      content => template('bugzilla-dev/params')
    }

    apache::webapp_other { 'bugzilla-dev':
        webapp_file => 'bugzilla-dev/webapp_bugzilla.conf',
    }

    $bugs_vhost = "bugs-dev.${::domain}"
    $vhost_root = '/usr/share/bugzilla'

    apache::vhost::redirect_ssl { $bugs_vhost: }

    apache::vhost::base { $bugs_vhost:
        content  => template('bugzilla-dev/vhost.conf'),
        aliases  => { '/bugzilla/' => $vhost_root },
        use_ssl  => true,
        location => $vhost_root,
        vhost    => $bugs_vhost,
    }

    git::snapshot { $bugzilla_dev_location:
      source  => "git://git.${::domain}/web/bugs"
    }

    file { 'Mageia':
      ensure  => directory,
      path    => '/usr/share/bugzilla',
      group   => 'apache',
      mode    => '0640',
      recurse => true,
      require => Git::Snapshot[$bugzilla_dev_location],
    }

    file { '/usr/share/bugzilla/robots.txt':
      group   => 'apache',
      mode    => '0640',
      content => template('bugzilla-dev/robots.txt')
    }

    cron { 'collectstats':
        command => '/usr/share/bugzilla/bin/collectstats.pl',
        user    => 'apache',
        hour    => 2,
        minute  => 30,
    }
}