Plugin fixes for 5.x
This commit is contained in:
parent
ffc417c766
commit
7efec96ea9
4 changed files with 6 additions and 12 deletions
|
|
@ -7,12 +7,9 @@
|
|||
|
||||
- set_fact: list_command="list"
|
||||
|
||||
- set_fact: list_command="--list"
|
||||
when: es_version | version_compare('2.0', '<')
|
||||
|
||||
#List currently installed plugins - ignore xpack if > v 2.0
|
||||
- name: Check installed elasticsearch plugins
|
||||
shell: "{{es_home}}/bin/elasticsearch-plugin {{list_command}}{% if es_version | version_compare('5.0', '<') %} | sed -n '1!p' | cut -d '-' -f2-{% endif %}{% if es_version | version_compare('2.0', '>') %} | grep -vE '{{supported_xpack_features | join('|')}}|license'{% endif %}"
|
||||
shell: "{{es_home}}/bin/elasticsearch-plugin list | grep -vE 'x-pack|license'"
|
||||
register: installed_plugins
|
||||
failed_when: "'ERROR' in installed_plugins.stdout"
|
||||
changed_when: False
|
||||
|
|
@ -34,8 +31,7 @@
|
|||
ES_INCLUDE: "{{ instance_default_file }}"
|
||||
|
||||
- name: Install elasticsearch plugins
|
||||
command: >
|
||||
{{es_home}}/bin/elasticsearch-plugin install {{ item.plugin }}{% if item.version is defined and item.version != '' %}/{{ item.version }}{% endif %} {% if item.proxy_host is defined and item.proxy_host != '' and item.proxy_port is defined and item.proxy_port != ''%} -DproxyHost={{ item.proxy_host }} -DproxyPort={{ item.proxy_port }} {% elif es_proxy_host is defined and es_proxy_host != '' %} -DproxyHost={{ es_proxy_host }} -DproxyPort={{ es_proxy_port }} {% endif %} --silent
|
||||
command: "{{es_home}}/bin/elasticsearch-plugin install {{ item.plugin }} --batch --silent {% if item.proxy_host is defined and item.proxy_host != '' and item.proxy_port is defined and item.proxy_port != ''%} -DproxyHost={{ item.proxy_host }} -DproxyPort={{ item.proxy_port }} {% elif es_proxy_host is defined and es_proxy_host != '' %} -DproxyHost={{ es_proxy_host }} -DproxyPort={{ es_proxy_port }} {% endif %}"
|
||||
register: plugin_installed
|
||||
failed_when: "'ERROR' in plugin_installed.stdout"
|
||||
changed_when: plugin_installed.rc == 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue