From 7876a662caf6d93bcfc71eec098156b0a1060705 Mon Sep 17 00:00:00 2001 From: janderson2 Date: Mon, 15 May 2017 15:17:34 +0100 Subject: [PATCH] Fix yum proxy logic in repo template Previously if the proxy host was defined but empty, an invalid proxy was config was added and the install would fail. This is likely to occur for instances where you conditionally set the proxy. --- templates/elasticsearch.repo | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/templates/elasticsearch.repo b/templates/elasticsearch.repo index fdf04fa..562f74e 100644 --- a/templates/elasticsearch.repo +++ b/templates/elasticsearch.repo @@ -4,7 +4,6 @@ baseurl=https://artifacts.elastic.co/packages/{{ es_major_version }}/yum gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 -{% if es_proxy_host is defined and es_proxy_port is defined %} +{% if es_proxy_host is defined and es_proxy_host != '' and es_proxy_port is defined %} proxy=http://{{ es_proxy_host }}:{{es_proxy_port}} {% endif %} -