Replace colon with a dash.

IPv6 addresses have colons
as separators, in this case
we cant name an order with colons.

To preserve the IPv6 address we
can replace it with a dash.

Change-Id: I87a1fb8952081dcb49f64ffff62414df120dccac
Closes-bug: 1740261
This commit is contained in:
Carlos Camacho 2017-12-27 14:58:48 +01:00 committed by Emilien Macchi
parent c952df72cc
commit a02206f3d7

View File

@ -145,7 +145,10 @@ class tripleo::haproxy::horizon_endpoint (
collect_exported => false,
}
hash(zip($ip_addresses, $server_names)).each | $ip, $server | {
haproxy::balancermember { "horizon_${ip}_${server}":
# We need to be sure the IP (IPv6) don't have colons
# which is a reserved character to reference manifests
$non_colon_ip = regsubst($ip, ':', '-', 'G')
haproxy::balancermember { "horizon_${non_colon_ip}_${server}":
listening_service => 'horizon',
ports => $backend_port,
ipaddresses => $ip,