Make prefix available when es_plugins is not defined

This commit is contained in:
Maarten Bezemer 2016-12-07 22:54:33 +01:00
parent d341a4c0ea
commit 49dfa81684
2 changed files with 5 additions and 5 deletions

View file

@ -10,11 +10,6 @@
- set_fact: list_command="--list"
when: es_version | version_compare('2.0', '<')
- set_fact: es_binary_prefix=""
- set_fact: es_binary_prefix="elasticsearch-"
when: es_version | version_compare('5.0', '>=')
#List currently installed plugins - ignore xpack if > v 2.0
- name: Check installed elasticsearch plugins
shell: "{{es_home}}/bin/{{ es_binary_prefix }}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 %}"

View file

@ -1,5 +1,10 @@
---
- set_fact: es_binary_prefix=""
- set_fact: es_binary_prefix="elasticsearch-"
when: es_version | version_compare('5.0', '>=')
- name: Include optional user and group creation.
when: (es_user_id is defined) and (es_group_id is defined)
include: elasticsearch-optional-user.yml