Shield now causes restart

This commit is contained in:
Dale McDiarmid 2016-07-23 22:18:31 +01:00
parent 5d3616bd20
commit 4f6d5b0a4a
4 changed files with 16 additions and 14 deletions

View file

@ -26,6 +26,7 @@
with_items: "{{ installed_plugins.stdout_lines }}"
when: es_plugins_reinstall and installed_plugins.stdout_lines | length > 0 and not 'No plugin detected' in installed_plugins.stdout_lines[0]
notify: restart elasticsearch
register: plugin_installed
environment:
CONF_DIR: "{{ conf_dir }}"
ES_INCLUDE: "{{ instance_default_file }}"
@ -46,4 +47,5 @@
#Set permissions on plugins directory
- name: Set Plugin Directory Permissions
file: state=directory path={{ es_home }}/plugins owner={{ es_user }} group={{ es_group }} recurse=yes
file: state=directory path={{ es_home }}/plugins owner={{ es_user }} group={{ es_group }} recurse=yes
when: es_enable_xpack

View file

@ -14,9 +14,9 @@
- name: Remove license plugin
command: >
{{es_home}}/bin/plugin remove license
register: license_change
failed_when: "'ERROR' in license.stdout"
changed_when: license_change.rc == 1
register: xpack_state
failed_when: "'ERROR' in xpack_state.stdout"
changed_when: xpack_state.rc == 0
when: license_installed.rc == 0 and not es_enable_xpack
notify: restart elasticsearch
environment:
@ -28,9 +28,9 @@
- name: Install license plugin
command: >
{{es_home}}/bin/plugin install license
register: license_change
failed_when: "'ERROR' in license_change.stdout"
changed_when: license_change.rc == 0
register: xpack_state
failed_when: "'ERROR' in xpack_state.stdout"
changed_when: xpack_state.rc == 0
when: license_installed.rc == 1 and es_enable_xpack
notify: restart elasticsearch
environment:

View file

@ -14,9 +14,9 @@
- name: Remove shield plugin
command: >
{{es_home}}/bin/plugin remove shield
register: shield_change
failed_when: "'ERROR' in shield_change.stdout"
changed_when: shield_change.rc == 0
register: xpack_state
failed_when: "'ERROR' in xpack_state.stdout"
changed_when: xpack_state.rc == 0
when: shield_installed.rc == 0 and (not es_enable_xpack or not '"shield" in es_xpack_features')
notify: restart elasticsearch
environment:
@ -28,9 +28,9 @@
- name: Install shield plugin
command: >
{{es_home}}/bin/plugin install shield
register: shield_change
failed_when: "'ERROR' in shield_change.stdout"
changed_when: shield_change.rc == 0
register: xpack_state
failed_when: "'ERROR' in xpack_state.stdout"
changed_when: xpack_state.rc == 0
when: shield_installed.rc == 1 and es_enable_xpack and '"shield" in es_xpack_features'
notify: restart elasticsearch
environment: