Puppet Class: role::labs::redirector
- Defined in:
- modules/role/manifests/labs/redirector.pp
Overview
Provision nginx as a http redirector
Installs nginx and configures multiple named vhosts which each map to a single 301 status redirect. Can be used to setup permanent redirects from Labs web proxies to new locations such as Tool Lab tools.
- default_url
-
Default URL to redirect unconfigured Hosts to. Will emit a 302 redirect rathter than a 301.
- redirects
-
Hash of (Host, target URL) values
14 15 16 17 18 19 20 21 22 23 24 |
# File 'modules/role/manifests/labs/redirector.pp', line 14
class role::labs::redirector(
$default_url,
$redirects,
) {
class { '::nginx':
variant => 'light',
}
nginx::site { 'redirect':
content => template('role/labs/redirector/nginx.conf.erb'),
}
}
|