diff options
author | Ryan Coleman <ryan@puppetlabs.com> | 2012-10-10 12:05:45 -0700 |
---|---|---|
committer | Ryan Coleman <ryan@puppetlabs.com> | 2012-10-10 12:05:45 -0700 |
commit | 13d91ef8f8340a941d197c53122b841499f9b786 (patch) | |
tree | 3c87add57c24c94dae109dc5ff3f7b08ae525f8e | |
parent | 82cc860495ebb89a08dd02191ec34f5d8b858592 (diff) | |
parent | 37193348a660c14718dc0503cda687849c3ccad3 (diff) |
Merge pull request #8 from hunner/update_docs
Update hash formatting for readability
-rw-r--r-- | manifests/config.pp | 10 | ||||
-rw-r--r-- | manifests/data.pp | 82 | ||||
-rw-r--r-- | manifests/init.pp | 49 |
3 files changed, 83 insertions, 58 deletions
diff --git a/manifests/config.pp b/manifests/config.pp index 444905b..f47e387 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -71,10 +71,14 @@ define haproxy::config ( $order = '20', $virtual_ip = $::ipaddress, $mode = 'tcp', - $haproxy_config_options = {'option' => ['tcplog', - 'ssl-hello-chk'], - 'balance' => 'roundrobin'}, $collect_exported = true, + $haproxy_config_options = { + 'option' => [ + 'tcplog', + 'ssl-hello-chk' + ], + 'balance' => 'roundrobin' + } ) { concat::fragment { "${name}_config_block": order => $order, diff --git a/manifests/data.pp b/manifests/data.pp index effa0f8..ab920ed 100644 --- a/manifests/data.pp +++ b/manifests/data.pp @@ -7,40 +7,58 @@ class haproxy::data { case $osfamily { Redhat: { - $haproxy_global_options = { 'log' => "${::ipaddress} local0", - 'chroot' => '/var/lib/haproxy', - 'pidfile' => '/var/run/haproxy.pid', - 'maxconn' => '4000', - 'user' => 'haproxy', - 'group' => 'haproxy', - 'daemon' => '', - 'stats' => 'socket /var/lib/haproxy/stats' - } - $haproxy_defaults_options = { 'log' => 'global', - 'stats' => 'enable', - 'option' => 'redispatch', - 'retries' => '3', - 'timeout' => ['http-request 10s', 'queue 1m', 'connect 10s', 'client 1m', 'server 1m', 'check 10s'], - 'maxconn' => '8000' - } + $haproxy_global_options = { + 'log' => "${::ipaddress} local0", + 'chroot' => '/var/lib/haproxy', + 'pidfile' => '/var/run/haproxy.pid', + 'maxconn' => '4000', + 'user' => 'haproxy', + 'group' => 'haproxy', + 'daemon' => '', + 'stats' => 'socket /var/lib/haproxy/stats' + } + $haproxy_defaults_options = { + 'log' => 'global', + 'stats' => 'enable', + 'option' => 'redispatch', + 'retries' => '3', + 'timeout' => [ + 'http-request 10s', + 'queue 1m', + 'connect 10s', + 'client 1m', + 'server 1m', + 'check 10s', + ], + 'maxconn' => '8000' + } } Debian: { - $haproxy_global_options = { 'log' => "${::ipaddress} local0", - 'chroot' => '/var/lib/haproxy', - 'pidfile' => '/var/run/haproxy.pid', - 'maxconn' => '4000', - 'user' => 'haproxy', - 'group' => 'haproxy', - 'daemon' => '', - 'stats' => 'socket /var/lib/haproxy/stats' - } - $haproxy_defaults_options = { 'log' => 'global', - 'stats' => 'enable', - 'option' => 'redispatch', - 'retries' => '3', - 'timeout' => ['http-request 10s', 'queue 1m', 'connect 10s', 'client 1m', 'server 1m', 'check 10s'], - 'maxconn' => '8000' - } + $haproxy_global_options = { + 'log' => "${::ipaddress} local0", + 'chroot' => '/var/lib/haproxy', + 'pidfile' => '/var/run/haproxy.pid', + 'maxconn' => '4000', + 'user' => 'haproxy', + 'group' => 'haproxy', + 'daemon' => '', + 'stats' => 'socket /var/lib/haproxy/stats' + } + $haproxy_defaults_options = { + 'log' => 'global', + 'stats' => 'enable', + 'option' => 'redispatch', + 'retries' => '3', + 'timeout' => [ + 'http-request 10s', + 'queue 1m', + 'connect 10s', + 'client 1m', + 'server 1m', + 'check 10s', + ], + 'maxconn' => '8000' + } } default: { fail("The $::osfamily operating system is not supported with the haproxy module") } } diff --git a/manifests/init.pp b/manifests/init.pp index f75051c..c36b1ae 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -31,29 +31,32 @@ # === Examples # # class { 'haproxy': -# enable => true, -# haproxy_global_options => { 'log' => "${::ipaddress} local0", -# 'chroot' => '/var/lib/haproxy', -# 'pidfile' => '/var/run/haproxy.pid', -# 'maxconn' => '4000', -# 'user' => 'haproxy', -# 'group' => 'haproxy', -# 'daemon' => '', -# 'stats' => 'socket /var/lib/haproxy/stats' -# }, -# haproxy_defaults_options => { 'log' => 'global', -# 'stats' => 'enable', -# 'option' => 'redispatch', -# 'retries' => '3', -# 'timeout' => ['http-request 10s', -# 'queue 1m', -# 'connect 10s', -# 'client 1m', -# 'server 1m', -# 'check 10s'], -# 'maxconn' => '8000' -# }, -# +# enable => true, +# haproxy_global_options => { +# 'log' => "${::ipaddress} local0", +# 'chroot' => '/var/lib/haproxy', +# 'pidfile' => '/var/run/haproxy.pid', +# 'maxconn' => '4000', +# 'user' => 'haproxy', +# 'group' => 'haproxy', +# 'daemon' => '', +# 'stats' => 'socket /var/lib/haproxy/stats' +# }, +# haproxy_defaults_options => { +# 'log' => 'global', +# 'stats' => 'enable', +# 'option' => 'redispatch', +# 'retries' => '3', +# 'timeout' => [ +# 'http-request 10s', +# 'queue 1m', +# 'connect 10s', +# 'client 1m', +# 'server 1m', +# 'check 10s' +# ], +# 'maxconn' => '8000' +# }, # } # # === Authors |