Fix for license update

This commit is contained in:
Dale McDiarmid 2017-01-04 16:39:00 +00:00
parent 3ed945d2aa
commit fc400862b1
4 changed files with 12 additions and 8 deletions

View file

@ -1,5 +1,11 @@
--- ---
- name: Ensure elasticsearch is started
service: name={{instance_init_script | basename}} state=started enabled=yes
- name: Wait for elasticsearch to startup
wait_for: host={{es_api_host}} port={{es_api_port}} delay=10
- name: Get template files - name: Get template files
find: paths="/etc/elasticsearch/templates" patterns="*.json" find: paths="/etc/elasticsearch/templates" patterns="*.json"
register: templates register: templates

View file

@ -6,13 +6,6 @@
service: name={{instance_init_script | basename}} state=restarted enabled=yes service: name={{instance_init_script | basename}} state=restarted enabled=yes
when: es_restart_on_change and es_start_service and ((plugin_installed is defined and plugin_installed.changed) or (config_updated is defined and config_updated.changed) or (xpack_state.changed) or (debian_elasticsearch_install_from_repo.changed or redhat_elasticsearch_install_from_repo.changed or elasticsearch_install_from_package.changed)) when: es_restart_on_change and es_start_service and ((plugin_installed is defined and plugin_installed.changed) or (config_updated is defined and config_updated.changed) or (xpack_state.changed) or (debian_elasticsearch_install_from_repo.changed or redhat_elasticsearch_install_from_repo.changed or elasticsearch_install_from_package.changed))
# Assumes all handlers need to be started as likely to make HTTP calls
- name: Ensure elasticsearch is started
service: name={{instance_init_script | basename}} state=started enabled=yes
- name: Wait for elasticsearch to startup
wait_for: host={{es_api_host}} port={{es_api_port}} delay=10
# All security specific actions should go in here # All security specific actions should go in here
- name: activate-shield - name: activate-shield
include: ./handlers/shield/elasticsearch-shield.yml include: ./handlers/shield/elasticsearch-shield.yml

View file

@ -1,5 +1,10 @@
--- ---
- name: Ensure elasticsearch is started
service: name={{instance_init_script | basename}} state=started enabled=yes
- name: Wait for elasticsearch to startup
wait_for: host={{es_api_host}} port={{es_api_port}} delay=10
- name: activate-license - name: activate-license
include: ./handlers/shield/elasticsearch-xpack-activation.yml include: ./handlers/shield/elasticsearch-xpack-activation.yml
when: es_enable_xpack and es_xpack_license is defined and es_xpack_license != '' when: es_enable_xpack and es_xpack_license is defined and es_xpack_license != ''

View file

@ -26,7 +26,7 @@
body: "{{ es_xpack_license }}" body: "{{ es_xpack_license }}"
return_content: yes return_content: yes
register: license_activated register: license_activated
no_log: True #no_log: True
when: '"shield" in es_xpack_features' when: '"shield" in es_xpack_features'
failed_when: > failed_when: >
license_activated.status != 200 or license_activated.status != 200 or