@@ -41,7 +41,7 @@ node 'haproxy-server' {
41
41
include ::haproxy
42
42
haproxy::listen { 'puppet00':
43
43
collect_exported => false,
44
- ipaddress => $::ipaddress ,
44
+ ipaddress => $facts['networking']['ip'] ,
45
45
ports => '8140',
46
46
}
47
47
haproxy::balancermember { 'server00':
@@ -70,7 +70,7 @@ The main [`haproxy` class](#class-haproxy) has many options for configuring your
70
70
~~~ puppet
71
71
class { 'haproxy':
72
72
global_options => {
73
- 'log' => "${::ipaddress } local0",
73
+ 'log' => "${facts['networking']['ip'] } local0",
74
74
'chroot' => '/var/lib/haproxy',
75
75
'pidfile' => '/var/run/haproxy.pid',
76
76
'maxconn' => '4000',
@@ -151,7 +151,7 @@ To export the resource for a balancermember and collect it on a single HAProxy l
151
151
152
152
~~~ puppet
153
153
haproxy::listen { 'puppet00':
154
- ipaddress => $::ipaddress ,
154
+ ipaddress => $facts['networking']['ip'] ,
155
155
ports => '8140',
156
156
mode => 'tcp',
157
157
options => {
@@ -195,8 +195,8 @@ First export the resource for a balancermember:
195
195
@@haproxy::balancermember { 'haproxy':
196
196
listening_service => 'puppet00',
197
197
ports => '8140',
198
- server_names => $:: hostname,
199
- ipaddresses => $::ipaddress ,
198
+ server_names => $facts['networking'][' hostname'] ,
199
+ ipaddresses => $facts['networking']['ip'] ,
200
200
options => 'check',
201
201
}
202
202
~~~
@@ -229,16 +229,16 @@ Install and configure an HAProxy service listening on port 8140 and balanced aga
229
229
node 'haproxy-server' {
230
230
include ::haproxy
231
231
haproxy::listen { 'puppet00':
232
- ipaddress => $::ipaddress ,
232
+ ipaddress => $facts['networking']['ip'] ,
233
233
ports => '8140',
234
234
}
235
235
}
236
236
237
237
node /^server\d+/ {
238
- @@haproxy::balancermember { $:: fqdn:
238
+ @@haproxy::balancermember { $facts['networking'][' fqdn'] :
239
239
listening_service => 'puppet00',
240
- server_names => $:: hostname,
241
- ipaddresses => $::ipaddress ,
240
+ server_names => $facts['networking'][' hostname'] ,
241
+ ipaddresses => $facts['networking']['ip'] ,
242
242
ports => '8140',
243
243
options => 'check',
244
244
}
@@ -253,7 +253,7 @@ This example routes traffic from port 8140 to all balancermembers added to a bac
253
253
254
254
~~~ puppet
255
255
haproxy::frontend { 'puppet00':
256
- ipaddress => $::ipaddress ,
256
+ ipaddress => $facts['networking']['ip'] ,
257
257
ports => '8140',
258
258
mode => 'tcp',
259
259
bind_options => 'accept-proxy',
@@ -272,7 +272,7 @@ If option order is important, pass an array of hashes to the `options` parameter
272
272
273
273
~~~ puppet
274
274
haproxy::frontend { 'puppet00':
275
- ipaddress => $::ipaddress ,
275
+ ipaddress => $facts['networking']['ip'] ,
276
276
ports => '8140',
277
277
mode => 'tcp',
278
278
bind_options => 'accept-proxy',
@@ -397,7 +397,7 @@ class and uses `haproxy::instance` to add an additional instance called
397
397
haproxy::listen { 'puppet00':
398
398
instance => 'haproxy',
399
399
collect_exported => false,
400
- ipaddress => $::ipaddress ,
400
+ ipaddress => $facts['networking']['ip'] ,
401
401
ports => '8800',
402
402
}
403
403
@@ -411,7 +411,7 @@ class and uses `haproxy::instance` to add an additional instance called
411
411
haproxy::listen { 'puppet00':
412
412
instance => 'beta',
413
413
collect_exported => false,
414
- ipaddress => $::ipaddress ,
414
+ ipaddress => $facts['networking']['ip'] ,
415
415
ports => '9900',
416
416
}
417
417
~~~
@@ -430,7 +430,7 @@ The second uses a custom package.
430
430
section_name => 'puppet00',
431
431
instance => 'group1',
432
432
collect_exported => false,
433
- ipaddress => $::ipaddress ,
433
+ ipaddress => $facts['networking']['ip'] ,
434
434
ports => '8800',
435
435
}
436
436
haproxy::instance { 'group2': }
@@ -444,7 +444,7 @@ The second uses a custom package.
444
444
section_name => 'puppet00',
445
445
instance => 'group2',
446
446
collect_exported => false,
447
- ipaddress => $::ipaddress ,
447
+ ipaddress => $facts['networking']['ip'] ,
448
448
ports => '9900',
449
449
}
450
450
~~~
0 commit comments