7f747d0875
Elasticsearch does not currently include plugins in their packages, and hosts them as .zip files from https://artifacts.elastic.co/downloads/. These can be installed from a mirror by changing the elastichsearch-plugin call to reference a hosted file URI. However, the plugin removal stage uses the plugin name, so both name and URI have to be known for the remove and reinstall plugin tasks in the elasticsearch role to work. This commit changes the plugin data format to add an optional remote field so that a URI can be optionally used Change-Id: I2c366cbeb9912c3aba09ecc5e174baa50de28a1f
27 lines
1.0 KiB
YAML
27 lines
1.0 KiB
YAML
---
|
|
# Copyright 2018, Rackspace US, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
- name: Remove plugins
|
|
command: "/usr/share/elasticsearch/bin/elasticsearch-plugin remove --verbose {{ item.name }}"
|
|
failed_when: false
|
|
changed_when:
|
|
- remove_plugin.rc == 0
|
|
register: remove_plugin
|
|
with_items: "{{ elastic_plugins }}"
|
|
|
|
- name: Install plugins
|
|
command: "/usr/share/elasticsearch/bin/elasticsearch-plugin install --batch --verbose {{ item.remote | default(item.name) }}"
|
|
with_items: "{{ elastic_plugins }}"
|