mirror of
https://github.com/aljazceru/ansible-elasticsearch.git
synced 2025-12-17 17:14:20 +01:00
@@ -21,7 +21,7 @@
|
|||||||
- name: Remove elasticsearch plugins
|
- name: Remove elasticsearch plugins
|
||||||
command: "{{es_home}}/bin/plugin remove {{item}} --silent"
|
command: "{{es_home}}/bin/plugin remove {{item}} --silent"
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
with_items: installed_plugins.stdout_lines
|
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]
|
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
|
notify: restart elasticsearch
|
||||||
environment:
|
environment:
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
register: plugin_installed
|
register: plugin_installed
|
||||||
failed_when: "'Failed to install' in plugin_installed.stderr"
|
failed_when: "'Failed to install' in plugin_installed.stderr"
|
||||||
changed_when: plugin_installed.rc == 0
|
changed_when: plugin_installed.rc == 0
|
||||||
with_items: es_plugins
|
with_items: "{{ es_plugins }}"
|
||||||
when: es_plugins is defined and not es_plugins is none
|
when: es_plugins is defined and not es_plugins is none
|
||||||
notify: restart elasticsearch
|
notify: restart elasticsearch
|
||||||
environment:
|
environment:
|
||||||
@@ -51,4 +51,4 @@
|
|||||||
|
|
||||||
#Set permissions on plugins directory
|
#Set permissions on plugins directory
|
||||||
- name: Set Plugin Directory Permissions
|
- name: Set Plugin Directory Permissions
|
||||||
file: state=directory path={{ plugin_dir }} owner={{ es_user }} group={{ es_group }} recurse=yes
|
file: state=directory path={{ plugin_dir }} owner={{ es_user }} group={{ es_group }} recurse=yes
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
- name: Copy templates to elasticsearch
|
- name: Copy templates to elasticsearch
|
||||||
copy: src={{ item }} dest=/etc/elasticsearch/ owner={{ es_user }} group={{ es_group }}
|
copy: src={{ item }} dest=/etc/elasticsearch/ owner={{ es_user }} group={{ es_group }}
|
||||||
with_fileglob: es_templates_fileglob
|
with_fileglob: "{{ es_templates_fileglob }}"
|
||||||
|
|
||||||
- set_fact: http_port=9200
|
- set_fact: http_port=9200
|
||||||
|
|
||||||
@@ -24,4 +24,4 @@
|
|||||||
|
|
||||||
- name: Install template(s)
|
- name: Install template(s)
|
||||||
command: "curl -sL -XPUT http://localhost:{{http_port}}/_template/{{item}} -d @/etc/elasticsearch/templates/{{item}}.json"
|
command: "curl -sL -XPUT http://localhost:{{http_port}}/_template/{{item}} -d @/etc/elasticsearch/templates/{{item}}.json"
|
||||||
with_items: resultstemplate.stdout_lines
|
with_items: "{{ resultstemplate.stdout_lines }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user