
This reverts commit 7b9ea298cf4ae941af74381925b17a4b29337eb9. Upgrading puppetlabs-apache to version 0.4.0 will give us important variables in apache::params (specifically $conf_dir and $vdir) which will allow us to modify the cgit module to run on both Debuntu and RHEL systems -- which is useful because test.sh should be testing all modules on both systems. Of the two issues that 7b9ea298 addresses, I believe that our Oneiric hosts have all gone the way of the dinosaur and we can work around the docroot check by replacing 'MEANINGLESS ARGUMENT' with '/tmp/meaningless_docroot'. Conflicts: install_modules.sh Change-Id: I7c08f85db6810ab28fa044f1923833359271e8ec
86 lines
2.0 KiB
Puppet
86 lines
2.0 KiB
Puppet
# == Class: etherpad_lite::apache
|
|
#
|
|
class etherpad_lite::apache (
|
|
$vhost_name = $::fqdn,
|
|
$ssl_cert_file = '',
|
|
$ssl_key_file = '',
|
|
$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.
|
|
) {
|
|
|
|
package { 'ssl-cert':
|
|
ensure => present,
|
|
}
|
|
|
|
include apache
|
|
apache::vhost { $vhost_name:
|
|
port => 443,
|
|
docroot => '/tmp/meaningless_docroot',
|
|
priority => '50',
|
|
template => 'etherpad_lite/etherpadlite.vhost.erb',
|
|
ssl => true,
|
|
}
|
|
a2mod { 'rewrite':
|
|
ensure => present,
|
|
}
|
|
a2mod { 'proxy':
|
|
ensure => present,
|
|
}
|
|
a2mod { 'proxy_http':
|
|
ensure => present,
|
|
}
|
|
file { '/etc/apache2/conf.d/connection-tuning':
|
|
ensure => present,
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0644',
|
|
source => 'puppet:///modules/etherpad_lite/apache-connection-tuning',
|
|
notify => Service['httpd'],
|
|
}
|
|
|
|
file { '/etc/ssl/certs':
|
|
ensure => directory,
|
|
owner => 'root',
|
|
mode => '0755',
|
|
}
|
|
|
|
file { '/etc/ssl/private':
|
|
ensure => directory,
|
|
owner => 'root',
|
|
mode => '0700',
|
|
}
|
|
|
|
if $ssl_cert_file_contents != '' {
|
|
file { $ssl_cert_file:
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0640',
|
|
content => $ssl_cert_file_contents,
|
|
before => Apache::Vhost[$vhost_name],
|
|
}
|
|
}
|
|
|
|
if $ssl_key_file_contents != '' {
|
|
file { $ssl_key_file:
|
|
owner => 'root',
|
|
group => 'ssl-cert',
|
|
mode => '0640',
|
|
content => $ssl_key_file_contents,
|
|
require => Package['ssl-cert'],
|
|
before => Apache::Vhost[$vhost_name],
|
|
}
|
|
}
|
|
|
|
if $ssl_chain_file_contents != '' {
|
|
file { $ssl_chain_file:
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0640',
|
|
content => $ssl_chain_file_contents,
|
|
before => Apache::Vhost[$vhost_name],
|
|
}
|
|
}
|
|
}
|