Last active
April 4, 2018 22:09
-
-
Save reidmv/80b8033e3c3c22a8c49bf7d3f3822370 to your computer and use it in GitHub Desktop.
HAProxy configuration for forwarding to Puppet webhook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class { 'haproxy': | |
global_options => { | |
'log' => "${::ipaddress} local2", | |
'chroot' => '/var/lib/haproxy', | |
'pidfile' => '/var/run/haproxy.pid', | |
'maxconn' => 5000, | |
'user' => 'haproxy', | |
'group' => 'haproxy', | |
'daemon' => '', | |
'stats' => 'socket /var/lib/haproxy/stats', | |
}, | |
defaults_options => { | |
'timeout' => [ | |
'connect 10s', | |
'queue 1m', | |
'client 2m', | |
'server 2m', | |
'http-request 120s', | |
] | |
} | |
} | |
haproxy::listen { 'code-manager-webhook': | |
mode => 'http', | |
collect_exported => false, | |
bind => { | |
"${::ipaddress}:9170" => ['ssl', 'crt', '/tmp/letsencrypt.key.crt.pem'], # concatenated private key and cert | |
}, | |
} | |
haproxy::balancermember { 'localhost': | |
listening_service => 'code-manager-webhook', | |
server_names => 'localhost', | |
ipaddresses => '127.0.0.1', | |
ports => '8170', | |
options => 'ssl verify none', | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment