- add haproxy server class - add haproxy profile to role - add hiera data for region specific haproxy - add selinux configuration - add certlist management - add default http and https frontends - add default stats listener
22 lines
696 B
Puppet
22 lines
696 B
Puppet
# default http frontend
|
|
class profiles::haproxy::fe_http (
|
|
Stdlib::IP::Address $bind_addr = $facts['networking']['ip'],
|
|
Stdlib::Port $bind_port = 80,
|
|
Array $bind_opts = ['transparent'],
|
|
Array $acls = [],
|
|
Array $http_request = [],
|
|
) {
|
|
haproxy::frontend { 'fe_http':
|
|
description => 'Default HTTP Frontend',
|
|
bind => { "${bind_addr}:${bind_port}" => $bind_opts },
|
|
mode => 'http',
|
|
options => {
|
|
'acl' => $acls,
|
|
'http-request' => $http_request,
|
|
'use_backend' => [
|
|
'%[req.hdr(host),lower,map(/etc/haproxy/domains-to-backends.map,be_default)]',
|
|
],
|
|
},
|
|
}
|
|
}
|