diff options
Diffstat (limited to 'modules/bugzilla-dev/manifests/init.pp')
-rwxr-xr-x | modules/bugzilla-dev/manifests/init.pp | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/modules/bugzilla-dev/manifests/init.pp b/modules/bugzilla-dev/manifests/init.pp new file mode 100755 index 00000000..06c53abc --- /dev/null +++ b/modules/bugzilla-dev/manifests/init.pp @@ -0,0 +1,79 @@ +class bugzilla { + + $extension_location = '/usr/share/bugzilla/extensions/Mageia' + + package {['bugzilla', + 'bugzilla-extension-sitemap', + 'graphviz', + 'perl-Template-GD', # needed for graphical_report support + 'perl-Test-Taint', + 'perl-JSON-RPC']: } + + $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 { '/etc/bugzilla/localconfig': + group => 'apache', + mode => '0640', + content => template('bugzilla/localconfig'), + require => Package['bugzilla'], + } + + + file { '/var/lib/bugzilla/params': + group => 'apache', + mode => '0640', + content => template('bugzilla/params'), + require => Package['bugzilla'], + } + + 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: + content => template('bugzilla/vhost.conf'), + aliases => { '/bugzilla/' => $vhost_root }, + use_ssl => true, + location => $vhost_root, + vhost => $bugs_vhost, + } + + git::snapshot { $extension_location: + source => "git://git.${::domain}/web/templates/bugzilla", + require => Package['bugzilla'], + } + + file { 'Mageia': + ensure => directory, + path => '/usr/share/bugzilla/extensions', + group => 'apache', + mode => '0640', + recurse => true, + require => Git::Snapshot[$extension_location], + } + + file { '/usr/share/bugzilla/www/robots.txt': + group => 'apache', + mode => '0640', + content => template('bugzilla/robots.txt'), + require => Package['bugzilla-extension-sitemap'], + } + + cron { 'collectstats': + command => '/usr/share/bugzilla/bin/collectstats.pl', + user => 'apache', + hour => 2, + minute => 30, + } +} |