From ff0f08b334dd6c876c956620d0369be5236fea0b Mon Sep 17 00:00:00 2001 From: Charles McLaughlin Date: Thu, 5 Jan 2017 15:22:58 -0800 Subject: [PATCH] Fix v5 yum repo url Based on the latest docs... https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html The yum repo url should end with /yum However, based on the 2.1 docs... https://www.elastic.co/guide/en/elasticsearch/reference/2.1/setup-repositories.html It should end with /centos Also don't try to install apt-transport-https on rpm systems. --- elasticsearch/repo.sls | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elasticsearch/repo.sls b/elasticsearch/repo.sls index 04756b2..141e765 100644 --- a/elasticsearch/repo.sls +++ b/elasticsearch/repo.sls @@ -6,7 +6,7 @@ {%- set repo_url = 'http://packages.elastic.co/elasticsearch/2.x' %} {%- endif %} -{%- if major_version == 5 %} +{%- if major_version == 5 and grains['os_family'] == 'Debian' %} apt-transport-https: pkg.installed {%- endif %} @@ -28,7 +28,7 @@ elasticsearch_repo: {%- elif grains['os_family'] == 'RedHat' %} - name: elasticsearch {%- if major_version == 5 %} - - baseurl: {{ repo_url }}/centos + - baseurl: {{ repo_url }}/yum {%- else %} - baseurl: {{ repo_url }}/centos {%- endif %}