aboutsummaryrefslogtreecommitdiffstats
path: root/modules/bugzilla/manifests/init.pp
blob: 68a0e7d9c680eb24382113607083e416e3fe6b14 (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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
class bugzilla {

    $bugzilla_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',
              'perl-Math-Random-ISAAC',
              'perl-Chart',
              'perl-PatchReader',
              'perl-ldap',
              'perl-SOAP-Lite',
              'perl-XMLRPC-Lite',
              'perl-CGI',
              'perl-HTML-Scrubber',
              'perl-Encode-Detect',
              'perl-File-MimeInfo',
              'perl-Email-Reply',
              'perl-HTML-FormatText-WithLinks',
              'perl-Cache-Memcached',
              'perl-File-Copy-Recursive',
              'perl-Daemon-Generic']: }

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

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

#   Only enable the first time ( need to be fixed)'
#    file { '/usr/share/bugzilla/localconfig':
#      group   => 'apache',
#      mode    => '0640',
#      content => template('bugzilla/localconfig')
#    }


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

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

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

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

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

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

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

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

    file { [
		'/usr/share/bugzilla/admin.cgi',
		'/usr/share/bugzilla/attachment.cgi',
                '/usr/share/bugzilla/buglist.cgi',
                '/usr/share/bugzilla/chart.cgi',
                '/usr/share/bugzilla/colchange.cgi',
                '/usr/share/bugzilla/config.cgi',
                '/usr/share/bugzilla/createaccount.cgi',
                '/usr/share/bugzilla/describecomponents.cgi',
                '/usr/share/bugzilla/describekeywords.cgi',
                '/usr/share/bugzilla/duplicates.cgi',
                '/usr/share/bugzilla/editclassifications.cgi',
                '/usr/share/bugzilla/editfields.cgi',
                '/usr/share/bugzilla/editgroups.cgi',
                '/usr/share/bugzilla/editmilestones.cgi',
                '/usr/share/bugzilla/editproducts.cgi',
                '/usr/share/bugzilla/editusers.cgi',
                '/usr/share/bugzilla/editversions.cgi',
                '/usr/share/bugzilla/editworkflow.cgi',
                '/usr/share/bugzilla/editcomponents.cgi',
                '/usr/share/bugzilla/editflagtypes.cgi',
                '/usr/share/bugzilla/editkeywords.cgi',
                '/usr/share/bugzilla/editparams.cgi',
                '/usr/share/bugzilla/editsettings.cgi',
                '/usr/share/bugzilla/editvalues.cgi',
                '/usr/share/bugzilla/editwhines.cgi',
                '/usr/share/bugzilla/enter_bug.cgi',
                '/usr/share/bugzilla/index.cgi',
                '/usr/share/bugzilla/jsonrpc.cgi',
                '/usr/share/bugzilla/page.cgi',
                '/usr/share/bugzilla/post_bug.cgi',  
                '/usr/share/bugzilla/process_bug.cgi',
                '/usr/share/bugzilla/query.cgi',
                '/usr/share/bugzilla/quips.cgi',
                '/usr/share/bugzilla/relogin.cgi',
                '/usr/share/bugzilla/reports.cgi',
                '/usr/share/bugzilla/rest.cgi',
                '/usr/share/bugzilla/search_plugin.cgi',
                '/usr/share/bugzilla/show_bug.cgi',
                '/usr/share/bugzilla/showdependencytree.cgi',
                '/usr/share/bugzilla/testagent.cgi',
                '/usr/share/bugzilla/userprefs.cgi',
                '/usr/share/bugzilla/xmlrpc.cgi',
                '/usr/share/bugzilla/report.cgi',
                '/usr/share/bugzilla/request.cgi',
                '/usr/share/bugzilla/sanitycheck.cgi',
                '/usr/share/bugzilla/show_activity.cgi',
                '/usr/share/bugzilla/showdependencygraph.cgi',
                '/usr/share/bugzilla/summarize_time.cgi',
                '/usr/share/bugzilla/token.cgi',
                '/usr/share/bugzilla/votes.cgi',
                '/usr/share/bugzilla/checksetup.pl',
                '/usr/share/bugzilla/clean-bug-user-last-visit.pl',
                '/usr/share/bugzilla/collectstats.pl',
                '/usr/share/bugzilla/email_in.pl',
                '/usr/share/bugzilla/importxml.pl',
                '/usr/share/bugzilla/install-module.pl',
                '/usr/share/bugzilla/jobqueue.pl',
                '/usr/share/bugzilla/migrate.pl',
                '/usr/share/bugzilla/runtests.pl',
                '/usr/share/bugzilla/sanitycheck.pl',
                '/usr/share/bugzilla/testserver.pl',
                '/usr/share/bugzilla/whineatnews.pl',
                '/usr/share/bugzilla/whine.pl'
	   ]:
      group   => 'apache',
      mode    => '0750',
    }


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