From 84ff89ad3caa3831c58d0b3e126beafc5efe92c2 Mon Sep 17 00:00:00 2001 From: sw0x2A Date: Wed, 31 Jan 2018 15:43:17 +0100 Subject: [PATCH] Support space-separated list in addresses "In Consul 1.0 and later [addresses from config_hash] can be set to a space-separated list of addresses to bind to [...]" https://www.consul.io/docs/agent/options.html#addresses Using a space-separated list in addresses for 'http' is currently not supported because it would break config in init scripts and other places. Limiting this to the first one mentioned fixes this. --- manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index b60e9b03..d1fe7947 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -208,7 +208,7 @@ } if ($config_hash_real['addresses'] and $config_hash_real['addresses']['http']) { - $http_addr = $config_hash_real['addresses']['http'] + $http_addr = split($config_hash_real['addresses']['http'], ' ')[0] } elsif ($config_hash_real['client_addr']) { $http_addr = $config_hash_real['client_addr'] } else {