puppet-prod/site/profiles/manifests/haproxy/fe_https.pp
Ben Vincent 2091f1ada3 feat: add haproxy profile
- 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
2024-04-06 03:27:45 +11:00

22 lines
688 B
Puppet

# default https frontend
class profiles::haproxy::fe_https (
Stdlib::IP::Address $bind_addr = $facts['networking']['ip'],
Stdlib::Port $bind_port = 443,
Array $bind_opts = [],
Array $acls = [],
Array $http_request = [],
) {
haproxy::frontend { 'fe_https':
description => 'Default HTTPS 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)]',
],
},
}
}