summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorHunter Haugen <h.haugen@gmail.com>2012-10-10 17:03:04 -0700
committerHunter Haugen <h.haugen@gmail.com>2012-10-10 17:03:04 -0700
commitc09e5a07cef578e1017af546e315f1c3826bf9a7 (patch)
treecaba811a27f5b967f2b7e0d01ab74f319b851bc4 /manifests
parentd7ffbc326a8172bb0d0ecb888ed12d2c7e3eb7fd (diff)
Allow multiple ports to be passed
haproxy supports a single port or port range, but also muliples of those. This commit changes the 'virtual_ip_port' parameter to 'ports' and updates the template to accept an array of ports
Diffstat (limited to 'manifests')
-rw-r--r--manifests/config.pp13
1 files changed, 7 insertions, 6 deletions
diff --git a/manifests/config.pp b/manifests/config.pp
index f47e387..415c5f6 100644
--- a/manifests/config.pp
+++ b/manifests/config.pp
@@ -20,9 +20,10 @@
# The namevar of the defined resource type is the listening service's name.
# This name goes right after the 'listen' statement in haproxy.cfg
#
-# [*virtual_ip_port*]
-# A unique port, or a port range for which the proxy will accept connections
-# for the ip address specified in the virtual_ip parameter.
+# [*ports*]
+# Ports on which the proxy will listen for connections on the ip address
+# specified in the virtual_ip parameter. Accepts either a single string or
+# an array of strings which may be a unique port or a hyphenated port range.
#
# [*order*]
# The order, or numerical weight, of the fragment created by this defined
@@ -40,14 +41,14 @@
# [*haproxy_config_options*]
# A hash of options that are inserted into the listening service
# configuration block.
-#
+#
# [*collect_exported*]
# Boolean, default 'true'. True means 'collect exported @@balancermember resources'
# (for the case when every balancermember node exports itself), false means
# 'rely on the existing declared balancermember resources' (for the case when you
# know the full set of balancermembers in advance and use haproxy::balancermember
# with array arguments, which allows you to deploy everything in 1 run)
-#
+#
#
# === Examples
#
@@ -67,7 +68,7 @@
# Gary Larizza <gary@puppetlabs.com>
#
define haproxy::config (
- $virtual_ip_port,
+ $ports,
$order = '20',
$virtual_ip = $::ipaddress,
$mode = 'tcp',