@@ -43,20 +43,20 @@ node 'haproxy-server' {
4343 haproxy::listen { 'puppet00':
4444 collect_exported => false,
4545 ipaddress => $facts['networking']['ip'],
46- ports => ' 8140' ,
46+ ports => [ 8140] ,
4747 }
4848 haproxy::balancermember { 'server00':
4949 listening_service => 'puppet00',
5050 server_names => 'server00.example.com',
5151 ipaddresses => '10.0.0.10',
52- ports => ' 8140' ,
52+ ports => [ 8140] ,
5353 options => 'check',
5454 }
5555 haproxy::balancermember { 'server01':
5656 listening_service => 'puppet00',
5757 server_names => 'server01.example.com',
5858 ipaddresses => '10.0.0.11',
59- ports => ' 8140' ,
59+ ports => [ 8140] ,
6060 options => 'check',
6161 }
6262}
@@ -153,7 +153,7 @@ To export the resource for a balancermember and collect it on a single HAProxy l
153153~~~ puppet
154154haproxy::listen { 'puppet00':
155155 ipaddress => $facts['networking']['ip'],
156- ports => ' 8140' ,
156+ ports => [ 8140] ,
157157 mode => 'tcp',
158158 options => {
159159 'option' => [
@@ -213,7 +213,7 @@ Then create the resource for multiple balancermembers at once:
213213~~~ puppet
214214haproxy::balancermember { 'haproxy':
215215 listening_service => 'puppet00',
216- ports => ' 8140' ,
216+ ports => 8140,
217217 server_names => ['server01', 'server02'],
218218 ipaddresses => ['192.168.56.200', '192.168.56.201'],
219219 options => 'check',
@@ -231,7 +231,7 @@ node 'haproxy-server' {
231231 include ::haproxy
232232 haproxy::listen { 'puppet00':
233233 ipaddress => $facts['networking']['ip'],
234- ports => ' 8140' ,
234+ ports => 8140,
235235 }
236236}
237237
@@ -240,7 +240,7 @@ node /^server\d+/ {
240240 listening_service => 'puppet00',
241241 server_names => $facts['networking']['hostname'],
242242 ipaddresses => $facts['networking']['ip'],
243- ports => ' 8140' ,
243+ ports => 8140,
244244 options => 'check',
245245 }
246246}
@@ -255,7 +255,7 @@ This example routes traffic from port 8140 to all balancermembers added to a bac
255255~~~ puppet
256256haproxy::frontend { 'puppet00':
257257 ipaddress => $facts['networking']['ip'],
258- ports => ' 8140' ,
258+ ports => 8140,
259259 mode => 'tcp',
260260 bind_options => 'accept-proxy',
261261 options => {
@@ -274,7 +274,7 @@ If option order is important, pass an array of hashes to the `options` parameter
274274~~~ puppet
275275haproxy::frontend { 'puppet00':
276276 ipaddress => $facts['networking']['ip'],
277- ports => ' 8140' ,
277+ ports => [ 8140] ,
278278 mode => 'tcp',
279279 bind_options => 'accept-proxy',
280280 options => [
@@ -353,7 +353,7 @@ haproxy::resolver { 'puppet00':
353353# Setup the balancermember to use the resolver for DNS resolution
354354haproxy::balancermember { 'haproxy':
355355 listening_service => 'puppet00',
356- ports => ' 8140' ,
356+ ports => 8140,
357357 server_names => ['server01', 'server02'],
358358 ipaddresses => ['server01', 'server02'],
359359 options => 'check resolvers puppet00 resolve-prefer ipv4',
@@ -399,7 +399,7 @@ class and uses `haproxy::instance` to add an additional instance called
399399 instance => 'haproxy',
400400 collect_exported => false,
401401 ipaddress => $facts['networking']['ip'],
402- ports => ' 8800' ,
402+ ports => 8800,
403403 }
404404
405405 haproxy::instance { 'beta': }
@@ -413,7 +413,7 @@ class and uses `haproxy::instance` to add an additional instance called
413413 instance => 'beta',
414414 collect_exported => false,
415415 ipaddress => $facts['networking']['ip'],
416- ports => ' 9900' ,
416+ ports => 9900,
417417 }
418418~~~
419419
@@ -432,7 +432,7 @@ The second uses a custom package.
432432 instance => 'group1',
433433 collect_exported => false,
434434 ipaddress => $facts['networking']['ip'],
435- ports => ' 8800' ,
435+ ports => 8800,
436436 }
437437 haproxy::instance { 'group2': }
438438 ->
@@ -446,7 +446,7 @@ The second uses a custom package.
446446 instance => 'group2',
447447 collect_exported => false,
448448 ipaddress => $facts['networking']['ip'],
449- ports => ' 9900' ,
449+ ports => 9900,
450450 }
451451~~~
452452
@@ -481,7 +481,7 @@ Or expressed using `haproxy::frontend`:
481481~~~ puppet
482482haproxy::frontend { 'ft_allapps':
483483 ipaddress => '0.0.0.0',
484- ports => '80',
484+ ports => [ '80'] ,
485485 mode => 'http',
486486 options => {
487487 'use_backend' => '%[req.hdr(host),lower,map(/etc/haproxy/domains-to-backends.map,bk_default)]'
0 commit comments