a6c709c86f
Change-Id: Ieeb8469126d64df75e7fa0fff67618daa6990674 Reviewed-on: https://review.openstack.org/11246 Approved: Monty Taylor <mordred@inaugust.com> Reviewed-by: Monty Taylor <mordred@inaugust.com> Tested-by: Jenkins
59 lines
1.2 KiB
Puppet
59 lines
1.2 KiB
Puppet
class etherpad_lite::apache (
|
|
$vhost_name = $fqdn,
|
|
$etherpad_crt,
|
|
$etherpad_key
|
|
) {
|
|
|
|
include remove_nginx
|
|
|
|
apache::vhost { $vhost_name:
|
|
port => 443,
|
|
docroot => 'MEANINGLESS ARGUMENT',
|
|
priority => '50',
|
|
template => 'etherpad_lite/etherpadlite.vhost.erb',
|
|
require => File["/etc/ssl/certs/${vhost_name}.pem",
|
|
"/etc/ssl/private/${vhost_name}.key"],
|
|
ssl => true,
|
|
}
|
|
a2mod { 'rewrite':
|
|
ensure => present
|
|
}
|
|
a2mod { 'proxy':
|
|
ensure => present
|
|
}
|
|
a2mod { 'proxy_http':
|
|
ensure => present
|
|
}
|
|
|
|
file { '/etc/ssl/certs':
|
|
ensure => directory,
|
|
owner => 'root',
|
|
mode => 0700,
|
|
}
|
|
|
|
file { '/etc/ssl/private':
|
|
ensure => directory,
|
|
owner => 'root',
|
|
mode => 0700,
|
|
}
|
|
|
|
file { "/etc/ssl/certs/${vhost_name}.pem":
|
|
ensure => present,
|
|
replace => true,
|
|
owner => 'root',
|
|
mode => 0600,
|
|
content => template('etherpad_lite/eplite.crt.erb'),
|
|
require => File['/etc/ssl/certs'],
|
|
}
|
|
|
|
file { "/etc/ssl/private/${vhost_name}.key":
|
|
ensure => present,
|
|
replace => true,
|
|
owner => 'root',
|
|
mode => 0600,
|
|
content => template('etherpad_lite/eplite.key.erb'),
|
|
require => File['/etc/ssl/private'],
|
|
}
|
|
|
|
}
|