Skip to content

Commit

Permalink
Merge pull request #50 from ninapavlich/master
Browse files Browse the repository at this point in the history
Update installation for version 6
  • Loading branch information
aboe76 authored Jan 3, 2018
2 parents 286c7c9 + 9bc82ba commit 469b684
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion elasticsearch/jvmopts.sls
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include:

{% from "elasticsearch/settings.sls" import elasticsearch with context %}
{%- if elasticsearch.major_version == 5 or elasticsearch.major_version == 6 %}
{% if elasticsearch.major_version >= 5 %}
{%- set jvm_opts = salt['pillar.get']('elasticsearch:jvm_opts') %}
{%- if jvm_opts %}
/etc/elasticsearch/jvm.options:
Expand Down
2 changes: 1 addition & 1 deletion elasticsearch/plugins.sls
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include:
{% from "elasticsearch/settings.sls" import elasticsearch with context %}
{%- set plugins_pillar = salt['pillar.get']('elasticsearch:plugins', {}) %}
{% if elasticsearch.major_version == 5 or elasticsearch.major_version == 6 %}
{% if elasticsearch.major_version >= 5 %}
{%- set plugin_bin = 'elasticsearch-plugin' %}
{% else %}
{%- set plugin_bin = 'plugin' %}
Expand Down
12 changes: 5 additions & 7 deletions elasticsearch/repo.sls
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
{% from "elasticsearch/settings.sls" import elasticsearch with context %}
{%- if elasticsearch.major_version == 6 %}
{%- set repo_url = 'https://artifacts.elastic.co/packages/6.x' %}
{%- elif elasticsearch.major_version == 5 %}
{%- set repo_url = 'https://artifacts.elastic.co/packages/5.x' %}
{%- if elasticsearch.major_version >= 5 %}
{%- set repo_url = 'https://artifacts.elastic.co/packages/' ~ (elasticsearch.major_version|string) ~ '.x' %}
{%- else %}
{%- set repo_url = 'http://packages.elastic.co/elasticsearch/2.x' %}
{%- endif %}
{%- if elasticsearch.major_version == 5 and grains['os_family'] == 'Debian' %}
{%- if elasticsearch.major_version >= 5 and grains['os_family'] == 'Debian' %}
apt-transport-https:
pkg.installed
{%- endif %}
Expand All @@ -17,7 +15,7 @@ elasticsearch_repo:
pkgrepo.managed:
- humanname: Elasticsearch {{ elasticsearch.major_version }}
{%- if grains.get('os_family') == 'Debian' %}
{%- if elasticsearch.major_version == 5 %}
{%- if elasticsearch.major_version >= 5 %}
- name: deb {{ repo_url }}/apt stable main
{%- else %}
- name: deb {{ repo_url }}/debian stable main
Expand All @@ -29,7 +27,7 @@ elasticsearch_repo:
- clean_file: true
{%- elif grains['os_family'] == 'RedHat' %}
- name: elasticsearch
{%- if elasticsearch.major_version == 5 %}
{%- if elasticsearch.major_version >= 5 %}
- baseurl: {{ repo_url }}/yum
{%- else %}
- baseurl: {{ repo_url }}/centos
Expand Down

0 comments on commit 469b684

Please sign in to comment.