2015-05-13 13:33:43 +02:00
---
2015-12-13 22:46:50 +00:00
2015-05-13 13:33:43 +02:00
- name : Remove elasticsearch plugins
2015-12-13 22:46:50 +00:00
command : "{{es_home}}/bin/plugin remove {{ item.plugin }} --silent"
2015-05-13 13:33:43 +02:00
ignore_errors : yes
with_items : es_plugins
when : ( ansible_os_family == 'RedHat' or ansible_os_family == 'Debian' ) and es_plugins_reinstall
2015-12-13 22:46:50 +00:00
notify : restart elasticsearch
environment :
CONF_DIR : "{{ conf_dir }}"
2015-05-13 13:33:43 +02:00
- name : Install elasticsearch plugins
#debug: var=item
2015-12-22 09:36:12 +00:00
command : "{{es_home}}/bin/plugin install {{ item.plugin }}{% if item.version is defined and item.version != '' %}/{{ item.version }}{% endif %} --silent"
2015-12-13 22:46:50 +00:00
register : plugin_installed
failed_when : "'Failed to install' in plugin_installed.stderr"
changed_when : plugin_installed.rc == 0
2015-05-13 13:33:43 +02:00
with_items : es_plugins
2015-12-13 22:46:50 +00:00
when : ansible_os_family == 'RedHat' or ansible_os_family == 'Debian'
notify : restart elasticsearch
environment :
CONF_DIR : "{{ conf_dir }}"
2015-12-22 09:33:45 +00:00
ES_INCLUDE : "{{ instance_default_file }}"
2015-12-13 22:46:50 +00:00
#Set permissions on plugins directory
- name : Set Plugin Directory Permissions
file : state=directory path={{ plugin_dir }} owner={{ es_user }} group={{ es_group }} recurse=yes