This repository has been archived by the owner on Jun 24, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Abstract 6.3 changes into a separate task to reduce all of the jinja one
liner complexity Set ES_PATH_CONF when installing so upgrading from 6.2 to 6.3 works as expected
- Loading branch information
Showing
9 changed files
with
52 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
|
||
# It is possible to set these are defaults with messy jinja templating one liners however: | ||
# 1. That is really hard to read and debug | ||
# 2. When running multiple plays with the same role the defaults are not re-evaluated. An example of this | ||
# can be seen in our the https://github.com/elastic/ansible-elasticsearch/blob/master/test/integration/xpack.yml | ||
# integration test and in the Multi Node server documentation examples https://github.com/elastic/ansible-elasticsearch/blob/master/test/integration/xpack.yml | ||
|
||
- name: Set the defaults here otherwise they can't be overriden in the same play if the role is called twice | ||
set_fact: | ||
es_open_xpack: true | ||
es_install_xpack: false | ||
es_repo_name: "{{ es_major_version }}" | ||
es_xpack_users_command: "elasticsearch-users" | ||
|
||
- name: Detect if es_version is before X-Pack was open and included | ||
set_fact: | ||
es_open_xpack: false | ||
when: "es_version | version_compare('6.3.0', '<')" | ||
|
||
- name: If this is an older version we need to install X-Pack as a plugin and use a differet users command | ||
set_fact: | ||
es_install_xpack: true | ||
es_xpack_users_command: "x-pack/users" | ||
when: | ||
- not es_open_xpack | ||
- es_enable_xpack | ||
|
||
- name: Use the oss repo and package if xpack is not being used | ||
set_fact: | ||
es_repo_name: "{{ 'oss-' + es_major_version }}" | ||
es_package_name: "elasticsearch-oss" | ||
when: | ||
- es_open_xpack | ||
- not es_enable_xpack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters