From 183513ecbc348214fceb4f961aaddf5073b3a572 Mon Sep 17 00:00:00 2001 From: Dale McDiarmid Date: Tue, 19 Jan 2016 11:50:02 +0100 Subject: [PATCH] Minor formatting --- tasks/elasticsearch-plugins.yml | 11 ++++++++++- tasks/elasticsearch.yml | 5 ++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tasks/elasticsearch-plugins.yml b/tasks/elasticsearch-plugins.yml index 195cc10..28e9ec8 100644 --- a/tasks/elasticsearch-plugins.yml +++ b/tasks/elasticsearch-plugins.yml @@ -1,10 +1,19 @@ --- +#es_plugins_reinstall will be set to true if elasticsearch_install.changed i.e. we have changed ES version +- set_fact: es_plugins_reinstall=true + when: elasticsearch_install.changed + +#List currently installed plugins + + + +#This needs to removed installed plugins not those listed - name: Remove elasticsearch plugins command: "{{es_home}}/bin/plugin remove {{ item.plugin }} --silent" ignore_errors: yes with_items: es_plugins - when: ( ansible_os_family == 'RedHat' or ansible_os_family == 'Debian' ) and es_plugins_reinstall + when: es_plugins_reinstall notify: restart elasticsearch environment: CONF_DIR: "{{ conf_dir }}" diff --git a/tasks/elasticsearch.yml b/tasks/elasticsearch.yml index da6b64c..5343ff3 100644 --- a/tasks/elasticsearch.yml +++ b/tasks/elasticsearch.yml @@ -8,7 +8,10 @@ - debug: msg="Node configuration {{ es_config }} " -# Install OS specific elasticsearch - this can be abbreviated in version 2.0.0 +#- name: Include specific Elasticsearch +# include: "elasticsearch-{{ansible_os_family}}.yml" + +#Install OS specific elasticsearch - this can be abbreviated in version 2.0.0 - name: Include specific Elasticsearch include: elasticsearch-Debian.yml when: ansible_os_family == 'Debian'