loadbalancer: make sure controller_* are array-typed
authorEmilien Macchi <emilien@redhat.com>
Wed, 25 May 2016 19:51:39 +0000 (15:51 -0400)
committerEmilien Macchi <emilien@redhat.com>
Thu, 26 May 2016 14:39:22 +0000 (14:39 +0000)
Make sure controller_hosts_real and controller_hosts_names_real become
array-types anyway, so we don't need to add brackets in Hiera lookups
(example on both undercloud & overcloud where we do [hiera('controller_host')]).

Change-Id: I2fe899482acfd51919262bc7a6a1c9f450e173f4

manifests/loadbalancer.pp

index 2926e49..ebac621 100644 (file)
@@ -392,16 +392,16 @@ class tripleo::loadbalancer (
     fail('$controller_hosts or $controller_host (now deprecated) is a mandatory parameter')
   }
   if $controller_hosts {
-    $controller_hosts_real = $controller_hosts
+    $controller_hosts_real = any2array($controller_hosts)
   } else {
     warning('$controller_host has been deprecated in favor of $controller_hosts')
-    $controller_hosts_real = $controller_host
+    $controller_hosts_real = any2array($controller_host)
   }
 
   if !$controller_hosts_names {
-    $controller_hosts_names_real = $controller_hosts_real
+    $controller_hosts_names_real = any2array($controller_hosts_real)
   } else {
-    $controller_hosts_names_real = $controller_hosts_names
+    $controller_hosts_names_real = any2array($controller_hosts_names)
   }
 
   if $manage_vip {