system-config/modules/mediawiki/manifests/init.pp
K Jonathan Harker 7af40db7f2 Revert "Revert "Downgrade puppetlabs-apache to version 0.0.4.""
This reverts commit 3afc75132a.

The new apache module has started managing /etc/httpd/conf/httpd.conf
with a template that has some significant differences than our template
in the cgit module.

Change-Id: I99795d35596f35dfc34e89891155dd2b83e465fe
2014-07-01 17:38:58 -07:00

79 lines
2.0 KiB
Puppet

# Class: mediawiki
#
class mediawiki(
$role = '',
$site_hostname = '',
$mediawiki_location = '',
$mediawiki_images_location = '',
$ssl_cert_file = "/etc/ssl/certs/${::fqdn}.pem",
$ssl_key_file = "/etc/ssl/private/${::fqdn}.key",
$ssl_chain_file = '',
$ssl_cert_file_contents = '', # If left empty puppet will not create file.
$ssl_key_file_contents = '', # If left empty puppet will not create file.
$ssl_chain_file_contents = '' # If left empty puppet will not create file.
) {
if ($role == 'app' or $role == 'all') {
require apache::dev
include apache
include mediawiki::php
include mediawiki::app
package { ['libapache2-mod-php5',
'lua5.2']:
ensure => present,
}
if $ssl_cert_file_contents != '' {
file { $ssl_cert_file:
owner => 'root',
group => 'root',
mode => '0640',
content => $ssl_cert_file_contents,
before => Apache::Vhost[$site_hostname],
}
}
if $ssl_key_file_contents != '' {
file { $ssl_key_file:
owner => 'root',
group => 'ssl-cert',
mode => '0640',
content => $ssl_key_file_contents,
before => Apache::Vhost[$site_hostname],
}
}
if $ssl_chain_file_contents != '' {
file { $ssl_chain_file:
owner => 'root',
group => 'root',
mode => '0640',
content => $ssl_chain_file_contents,
before => Apache::Vhost[$site_hostname],
}
}
apache::vhost { $site_hostname:
port => 443,
docroot => 'MEANINGLESS ARGUMENT',
priority => '50',
template => 'mediawiki/apache/mediawiki.erb',
ssl => true,
}
a2mod { 'rewrite':
ensure => present,
}
a2mod { 'expires':
ensure => present,
}
}
if ($role == 'image-scaler' or $role == 'all') {
include mediawiki::image_scaler
include mediawiki::php
include mediawiki::app
}
}
# vim:sw=2:ts=2:expandtab:textwidth=79