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.
This commit is contained in:
janderson2 2017-05-15 15:17:34 +01:00
parent 9197f2fbcd
commit 7876a662ca

View file

@ -4,7 +4,6 @@ baseurl=https://artifacts.elastic.co/packages/{{ es_major_version }}/yum
gpgcheck=1 gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1 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}} proxy=http://{{ es_proxy_host }}:{{es_proxy_port}}
{% endif %} {% endif %}