diff --git a/.kitchen.yml b/.kitchen.yml index 4c09c0a..9d2c326 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -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 diff --git a/tasks/elasticsearch-plugins.yml b/tasks/elasticsearch-plugins.yml index dd22194..752911f 100644 --- a/tasks/elasticsearch-plugins.yml +++ b/tasks/elasticsearch-plugins.yml @@ -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 diff --git a/tasks/xpack/elasticsearch-xpack-install.yml b/tasks/xpack/elasticsearch-xpack-install.yml index cdff1a9..5d9eefb 100644 --- a/tasks/xpack/elasticsearch-xpack-install.yml +++ b/tasks/xpack/elasticsearch-xpack-install.yml @@ -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 diff --git a/test/integration/package-5x/serverspec/default_spec.rb b/test/integration/package-5x/serverspec/default_spec.rb index 156dca8..4b2191b 100644 --- a/test/integration/package-5x/serverspec/default_spec.rb +++ b/test/integration/package-5x/serverspec/default_spec.rb @@ -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 \ No newline at end of file