summaryrefslogtreecommitdiffstats
path: root/manifests/haproxy.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/haproxy.pp')
-rw-r--r--manifests/haproxy.pp31
1 files changed, 8 insertions, 23 deletions
diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp
index 9d07fa9..e3e48ce 100644
--- a/manifests/haproxy.pp
+++ b/manifests/haproxy.pp
@@ -53,20 +53,15 @@
# The IPv4, IPv6 or filesystem socket path of the syslog server.
# Defaults to '/dev/log'
#
-# [*controller_host*]
-# (Deprecated)Host or group of hosts to load-balance the services
-# Can be a string or an array.
-# Defaults to undef
-#
# [*controller_hosts*]
# IPs of host or group of hosts to load-balance the services
# Can be a string or an array.
-# Defaults to undef
+# Defaults tohiera('controller_node_ips')
#
# [*controller_hosts_names*]
# Names of host or group of hosts to load-balance the services
# Can be a string or an array.
-# Defaults to undef
+# Defaults to hiera('controller_node_names', undef)
#
# [*controller_virtual_ip*]
# Control IP or group of IPs to bind the pools
@@ -279,9 +274,8 @@ class tripleo::haproxy (
$haproxy_log_address = '/dev/log',
$haproxy_stats_user = 'admin',
$haproxy_stats_password = undef,
- $controller_host = undef,
- $controller_hosts = undef,
- $controller_hosts_names = undef,
+ $controller_hosts = hiera('controller_node_ips'),
+ $controller_hosts_names = hiera('controller_node_names', undef),
$service_certificate = undef,
$internal_certificate = undef,
$ssl_cipher_suite = '!SSLv2:kEECDH:kRSA:kEDH:kPSK:+3DES:!aNULL:!eNULL:!MD5:!EXP:!RC4:!SEED:!IDEA:!DES',
@@ -358,20 +352,11 @@ class tripleo::haproxy (
}
$ports = merge($default_service_ports, $service_ports)
- if !$controller_host and !$controller_hosts {
- fail('$controller_hosts or $controller_host (now deprecated) is a mandatory parameter')
- }
- if $controller_hosts {
- $controller_hosts_real = any2array($controller_hosts)
- } else {
- warning('$controller_host has been deprecated in favor of $controller_hosts')
- $controller_hosts_real = any2array($controller_host)
- }
-
- if !$controller_hosts_names {
- $controller_hosts_names_real = any2array($controller_hosts_real)
+ $controller_hosts_real = any2array(split($controller_hosts, ','))
+ if ! $controller_hosts_names {
+ $controller_hosts_names_real = $controller_hosts_real
} else {
- $controller_hosts_names_real = any2array($controller_hosts_names)
+ $controller_hosts_names_real = downcase(any2array(split($controller_hosts_names, ',')))
}
# This code will be removed once we switch undercloud and overcloud to use both haproxy & keepalived roles.