puppet-prod/site/profiles/manifests/haproxy/fe_http.pp
Ben Vincent 220ac182f4 feat: sydney haproxy cluster
- add au-syd1 halb cluster
- add http-response to frontends
- manage haproxy after enc_role is correct
2024-04-28 21:14:36 +10:00

24 lines
769 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 = [],
Array $http_response = [],
) {
haproxy::frontend { 'fe_http':
description => 'Default HTTP Frontend',
bind => { "${bind_addr}:${bind_port}" => $bind_opts },
mode => 'http',
options => {
'acl' => $acls,
'http-request' => $http_request,
'http-response' => $http_response,
'use_backend' => [
'%[req.hdr(host),lower,map(/etc/haproxy/fe_http.map,be_default)]',
],
},
}
}