Update hash formatting for readability
authorHunter Haugen <h.haugen@gmail.com>
Thu, 30 Aug 2012 23:32:55 +0000 (16:32 -0700)
committerHunter Haugen <h.haugen@gmail.com>
Wed, 10 Oct 2012 18:56:11 +0000 (11:56 -0700)
manifests/data.pp
manifests/init.pp

index effa0f8..ab920ed 100644 (file)
@@ -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") }
   }
index f75051c..c36b1ae 100644 (file)
 # === 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