Skip to content

Instantly share code, notes, and snippets.

@ipcrm
Created February 3, 2016 04:35
Show Gist options
  • Save ipcrm/c5821321ada150b19fa0 to your computer and use it in GitHub Desktop.
Save ipcrm/c5821321ada150b19fa0 to your computer and use it in GitHub Desktop.
Puppet Master HAProxy Config
node haproxy.pdx.puppetlabs.demo {
class { 'haproxy': }
haproxy::frontend { 'puppet00':
ipaddress => '*',
ports => '8140',
mode => 'tcp',
options => [
{ 'default_backend' => 'puppet00' },
{ 'option' => [
'tcplog',
],
}
],
}
haproxy::backend { 'puppet00':
options => {
'option' => [
'tcplog',
'ssl-hello-chk'
],
'mode' => 'tcp',
'balance' => 'roundrobin',
},
}
haproxy::balancermember { 'master00':
listening_service => 'puppet00',
server_names => 'puppetmaster.example.com',
ipaddresses => '1.1.1.1',
ports => '8140',
}
firewall { '8140 allow puppetserver traffic':
dport => [8140],
proto => tcp,
action => accept,
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment