Colleen Murphy 17430b7507 Add Gemfile and puppet 4 checks
In anticipation of puppet 4, start trying to deal with puppet 4 things
that can be helpfully predicted by puppet lint plugins. Also fix errors
caught by the puppet-lint-unquoted_string-check and
puppet-lint-absolute_classname-check gems.

Change-Id: I9d74d25d2f2c95ec52a6db3bf070903240e1b933
2015-07-29 23:18:35 -07:00

53 lines
1.0 KiB
Puppet

# Define: httpd::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 httpd::vhost::redirect (
$port,
$dest,
$priority = '10',
$serveraliases = undef,
$template = 'httpd/vhost-redirect.conf.erb',
$vhost_name = '*'
) {
include ::httpd
$srvname = $name
file { "${priority}-${name}":
path => "${httpd::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'
}
}
}