Version 5.0 - no need for plugin prefix

This commit is contained in:
Dale McDiarmid 2017-01-11 10:26:57 +00:00
parent 2d7b851b1f
commit cde17346d5
6 changed files with 9 additions and 14 deletions

View file

@ -1,7 +1,7 @@
---
#Test if feature is installed
- shell: "{{es_home}}/bin/{{ es_binary_prefix }}plugin list{% if es_version | version_compare('5.0', '<') %} | sed -n '1!p' | cut -d '-' -f2-{% endif %} | grep {{item}}"
- shell: "{{es_home}}/bin/elasticsearch-plugin list{% if es_version | version_compare('5.0', '<') %} | sed -n '1!p' | cut -d '-' -f2-{% endif %} | grep {{item}}"
register: feature_installed
changed_when: False
failed_when: "'ERROR' in feature_installed.stdout"
@ -27,7 +27,7 @@
#Install plugin if not installed, or the es version has changed (so removed above), and its been requested
- name: Install {{item}} plugin
command: >
{{es_home}}/bin/{{ es_binary_prefix }}plugin install {{item}}
{{es_home}}/bin/elasticsearch-plugin install {{item}}
register: xpack_state
failed_when: "'ERROR' in xpack_state.stdout"
changed_when: xpack_state.rc == 0

View file

@ -7,7 +7,7 @@
#Check if license is installed
- name: Check License plugin is installed
shell: >
{{es_home}}/bin/{{ es_binary_prefix }}plugin list | tail -n +2 | grep license
{{es_home}}/bin/elasticsearch-plugin list | tail -n +2 | grep license
register: license_installed
ignore_errors: yes
failed_when: "'ERROR' in license_installed.stdout"
@ -19,7 +19,7 @@
#Remove license if installed and xpack not enabled
- name: Remove license plugin
command: >
{{es_home}}/bin/{{ es_binary_prefix }}plugin remove license
{{es_home}}/bin/elasticsearch-plugin remove license
register: xpack_state
failed_when: "'ERROR' in xpack_state.stdout"
changed_when: xpack_state.rc == 0
@ -32,7 +32,7 @@
#Install License if not installed, or it needs to be reinstalled due to ES change (above task will have removed), and its been requested.
- name: Install license plugin
command: >
{{es_home}}/bin/{{ es_binary_prefix }}plugin install license
{{es_home}}/bin/elasticsearch-plugin install license
register: xpack_state
failed_when: "'ERROR' in xpack_state.stdout"
changed_when: xpack_state.rc == 0