Changed default variable names so entire hash is not overwritten. Enabled plugin install
This commit is contained in:
parent
3aecd58b59
commit
3da43c91d4
7 changed files with 31 additions and 16 deletions
15
tasks/elasticsearch-plugins.yml
Normal file
15
tasks/elasticsearch-plugins.yml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
- name: Remove elasticsearch plugins
|
||||
command: /usr/share/elasticsearch/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
|
||||
|
||||
- name: Install elasticsearch plugins
|
||||
#debug: var=item
|
||||
command: /usr/share/elasticsearch/bin/plugin --install elasticsearch/{{ item.plugin }}/{{ item.version }} --silent
|
||||
register: command_result
|
||||
failed_when: "'Failed to install' in command_result.stderr"
|
||||
changed_when: command_result.rc == 0
|
||||
with_items: es_plugins
|
||||
when: ( ansible_os_family == 'RedHat' or ansible_os_family == 'Debian' )
|
||||
Loading…
Add table
Add a link
Reference in a new issue