diff --git a/tasks/install.yml b/tasks/install.yml index 8aa48715fbec302c1a4e1099ff9a49d2fcaf8160..e4e4d00961f22fa39084c1fe89ddb51128ea3f68 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -32,26 +32,9 @@ notify: - Restart Elasticsearch -- name: Uninstall Plugins - elasticsearch_plugin: - name: '{{ item }}' - state: absent - with_items: - - ingest-attachment - tags: - - reinstall-plugins - -- name: Install Plugins - elasticsearch_plugin: - name: '{{ item }}' - state: present - force: yes - with_items: - - ingest-attachment +- include_tasks: re-install-plugins.yml tags: - reinstall-plugins - notify: - - Restart Elasticsearch - name: Configure ES lineinfile: diff --git a/tasks/re-install-plugins.yml b/tasks/re-install-plugins.yml new file mode 100644 index 0000000000000000000000000000000000000000..2241ae5843f6861409a562a531a04d953c453777 --- /dev/null +++ b/tasks/re-install-plugins.yml @@ -0,0 +1,22 @@ +--- +# file: roles/elasticsearch/tasks/re-install-plugins.yml + +- name: Uninstall Plugins + elasticsearch_plugin: + name: '{{ item }}' + state: absent + with_items: + - ingest-attachment + +- name: Install Plugins + elasticsearch_plugin: + name: '{{ item }}' + state: present + force: yes + with_items: + - ingest-attachment + +- name: Restart Elasticsearch + service: + name: elasticsearch + state: restarted