Plugin fixes for 5.x

This commit is contained in:
Dale McDiarmid 2017-01-13 15:28:53 +00:00
parent ffc417c766
commit 7efec96ea9
4 changed files with 6 additions and 12 deletions

View file

@ -74,8 +74,7 @@ suites:
attributes:
extra_vars:
es_plugins:
- plugin: lmenezes/elasticsearch-kopf
version: master
- plugin: ingest-geoip
provisioner:
playbook: test/integration/package.yml
- name: config-5x
@ -88,8 +87,7 @@ suites:
attributes:
extra_vars:
es_plugins:
- plugin: lmenezes/elasticsearch-kopf
version: master
- plugin: ingest-geoip
provisioner:
playbook: test/integration/multi.yml
- name: xpack-5x

View file

@ -7,12 +7,9 @@
- set_fact: list_command="list"
- set_fact: list_command="--list"
when: es_version | version_compare('2.0', '<')
#List currently installed plugins - ignore xpack if > v 2.0
- name: Check installed elasticsearch plugins
shell: "{{es_home}}/bin/elasticsearch-plugin {{list_command}}{% if es_version | version_compare('5.0', '<') %} | sed -n '1!p' | cut -d '-' -f2-{% endif %}{% if es_version | version_compare('2.0', '>') %} | grep -vE '{{supported_xpack_features | join('|')}}|license'{% endif %}"
shell: "{{es_home}}/bin/elasticsearch-plugin list | grep -vE 'x-pack|license'"
register: installed_plugins
failed_when: "'ERROR' in installed_plugins.stdout"
changed_when: False
@ -34,8 +31,7 @@
ES_INCLUDE: "{{ instance_default_file }}"
- name: Install elasticsearch plugins
command: >
{{es_home}}/bin/elasticsearch-plugin install {{ item.plugin }}{% if item.version is defined and item.version != '' %}/{{ item.version }}{% endif %} {% if item.proxy_host is defined and item.proxy_host != '' and item.proxy_port is defined and item.proxy_port != ''%} -DproxyHost={{ item.proxy_host }} -DproxyPort={{ item.proxy_port }} {% elif es_proxy_host is defined and es_proxy_host != '' %} -DproxyHost={{ es_proxy_host }} -DproxyPort={{ es_proxy_port }} {% endif %} --silent
command: "{{es_home}}/bin/elasticsearch-plugin install {{ item.plugin }} --batch --silent {% if item.proxy_host is defined and item.proxy_host != '' and item.proxy_port is defined and item.proxy_port != ''%} -DproxyHost={{ item.proxy_host }} -DproxyPort={{ item.proxy_port }} {% elif es_proxy_host is defined and es_proxy_host != '' %} -DproxyHost={{ es_proxy_host }} -DproxyPort={{ es_proxy_port }} {% endif %}"
register: plugin_installed
failed_when: "'ERROR' in plugin_installed.stdout"
changed_when: plugin_installed.rc == 0

View file

@ -27,7 +27,7 @@
#Install plugin if not installed, or the es version has changed (so removed above), and its been requested
- name: Install x-pack plugin
command: >
{{es_home}}/bin/elasticsearch-plugin install x-pack
{{es_home}}/bin/elasticsearch-plugin install --batch x-pack {% if es_proxy_host is defined and es_proxy_host != '' %} -Dhttp.proxyHost={{ es_proxy_host }} -Dhttp.proxyPort={{ es_proxy_port }} {% endif %}
register: xpack_state
failed_when: "'ERROR' in xpack_state.stdout"
changed_when: xpack_state.rc == 0

View file

@ -2,5 +2,5 @@ require 'package_spec'
describe 'Package Tests v 5.x' do
include_examples 'package::init', "5.1.2", ["kopf"]
include_examples 'package::init', "5.1.2", ["ingest-geoip"]
end