27240c64bc
puppet-httpd is the openstack-infra version of puppetlabs-apache (0.0.4) release. This patchset will remove the puppetlabs-apache namespace from -infra allowing for possible future patchsets to use newer puppetlabs-apache modules. Change-Id: Id258092e1c1e21800c24512b5bdfee45b0939bca Signed-off-by: Paul Belanger <pabelanger@redhat.com>
84 lines
2.2 KiB
Puppet
84 lines
2.2 KiB
Puppet
# Copyright 2014 Hewlett-Packard Development Company, L.P.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
#
|
|
# == Class: zanata::apache
|
|
#
|
|
|
|
class zanata::apache (
|
|
$vhost_name = $::fqdn,
|
|
$serveradmin = "webmaster@${::fqdn}",
|
|
$ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem',
|
|
$ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.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.
|
|
) {
|
|
|
|
include ::httpd
|
|
include ::httpd::ssl
|
|
|
|
httpd_mod { 'proxy':
|
|
ensure => present,
|
|
}
|
|
|
|
httpd_mod { 'proxy_http':
|
|
ensure => present,
|
|
}
|
|
|
|
httpd_mod { 'proxy_ajp':
|
|
ensure => present,
|
|
}
|
|
|
|
::httpd::vhost { $vhost_name:
|
|
port => 443,
|
|
docroot => 'MEANINGLESS ARGUMENT',
|
|
priority => '50',
|
|
template => 'zanata/zanata.vhost.erb',
|
|
ssl => true,
|
|
subscribe => File['/opt/wildfly/standalone/configuration/standalone.xml'],
|
|
}
|
|
|
|
if $ssl_cert_file_contents != '' {
|
|
file { $ssl_cert_file:
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0640',
|
|
content => $ssl_cert_file_contents,
|
|
before => Httpd::Vhost[$vhost_name],
|
|
}
|
|
}
|
|
|
|
if $ssl_key_file_contents != '' {
|
|
file { $ssl_key_file:
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0640',
|
|
content => $ssl_key_file_contents,
|
|
before => Httpd::Vhost[$vhost_name],
|
|
}
|
|
}
|
|
|
|
if $ssl_chain_file_contents != '' {
|
|
file { $ssl_chain_file:
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0640',
|
|
content => $ssl_chain_file_contents,
|
|
before => Httpd::Vhost[$vhost_name],
|
|
}
|
|
}
|
|
|
|
}
|