
Add the rake "lint" target, and fix resulting minor errors, which were: --- manifests/mod/python.pp - WARNING: class not documented on line 1 manifests/mod/wsgi.pp - WARNING: class not documented on line 1 manifests/vhost.pp - WARNING: variable not enclosed in {} on line 80 manifests/vhost.pp - WARNING: variable not enclosed in {} on line 82 manifests/vhost/redirect.pp - WARNING: variable not enclosed in {} on line 43 manifests/vhost/redirect.pp - WARNING: variable not enclosed in {} on line 45 --- Change-Id: I2213f314d4bf92b4ddf58dbb19a80783380a55ce
53 lines
1.0 KiB
Puppet
53 lines
1.0 KiB
Puppet
# Define: apache::vhost::redirect
|
|
#
|
|
# This class will create a vhost that does nothing more than redirect to a
|
|
# given location
|
|
#
|
|
# Parameters:
|
|
# $port:
|
|
# Which port to list on
|
|
# $dest:
|
|
# Where to redirect to
|
|
# - $vhost_name
|
|
#
|
|
# Actions:
|
|
# Installs apache and creates a vhost
|
|
#
|
|
# Requires:
|
|
#
|
|
# Sample Usage:
|
|
#
|
|
define apache::vhost::redirect (
|
|
$port,
|
|
$dest,
|
|
$priority = '10',
|
|
$serveraliases = '',
|
|
$template = 'apache/vhost-redirect.conf.erb',
|
|
$vhost_name = '*'
|
|
) {
|
|
|
|
include apache
|
|
|
|
$srvname = $name
|
|
|
|
file { "${priority}-${name}":
|
|
path => "${apache::params::vdir}/${priority}-${name}",
|
|
content => template($template),
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0755',
|
|
require => Package['httpd'],
|
|
notify => Service['httpd'],
|
|
}
|
|
|
|
if ! defined(Firewall["0100-INPUT ACCEPT ${port}"]) {
|
|
@firewall {
|
|
"0100-INPUT ACCEPT ${port}":
|
|
jump => 'ACCEPT',
|
|
dport => '$port',
|
|
proto => 'tcp'
|
|
}
|
|
}
|
|
}
|
|
|