fix for ES plugins install

This commit is contained in:
Дехтярёв Евгений Артурович 2016-05-25 19:24:58 +06:00
parent e14ebe06ab
commit 01401f9d55
4 changed files with 9 additions and 8 deletions

View file

@ -1,8 +1,9 @@
---
#es_plugins_reinstall will be set to true if elasticsearch_install.changed i.e. we have changed ES version, or if no plugins listed. Otherwise it is false and requires explicitly setting.
# es_plugins_reinstall will be set to true if elasticsearch_install_from_repo.changed or elasticsearch_install_from_package.changed
# i.e. we have changed ES version(or we have clean installation of ES), or if no plugins listed. Otherwise it is false and requires explicitly setting.
- set_fact: es_plugins_reinstall=true
when: elasticsearch_install.changed or es_plugins is not defined or es_plugins is none
when: (elasticsearch_install_from_repo.changed or elasticsearch_install_from_package.changed) or es_plugins is not defined or es_plugins is none
- set_fact: list_command="list"
- set_fact: list_command="--list"
@ -35,7 +36,7 @@
failed_when: "'ERROR' in plugin_installed.stdout"
changed_when: plugin_installed.rc == 0
with_items: "{{ es_plugins }}"
when: es_plugins is defined and not es_plugins is none
when: es_plugins is defined and not es_plugins is none and es_plugins_reinstall
notify: restart elasticsearch
environment:
CONF_DIR: "{{ conf_dir }}"