xpack features refactoring (#653)

- rename es_enable_xpack variable to oss_version
  this variable name should be more explicit and consistent with the xpack changes made in 6.3
  es_enable_xpack can still be used but is deprecated and will be removed in a later version.
- remove es_xpack-features variables
  this variable was not working anymore since 6.3 [0]

[0]: https://github.com/elastic/ansible-elasticsearch/issues/608
This commit is contained in:
Julien Mailleret 2020-06-12 18:15:03 +02:00 committed by GitHub
parent c12542836e
commit cab03ece10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 31 additions and 74 deletions

View file

@ -5,6 +5,14 @@
# 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 backward compatibility for deprecated es_enable_xpack variable
when: es_enable_xpack is defined and not es_enable_xpack
block:
- name: Set fact oss_version when using es_enable_xpack
set_fact: oss_version=true
- name: Warn about deprecated es_enable_xpack variable
debug:
msg: "WARNING: es_enable_xpack variable is now deprecated. You should use oss_version instead"
- name: Set the defaults here otherwise they can't be overriden in the same play if the role is called twice
set_fact:
@ -14,7 +22,7 @@
es_other_repo_name: "{{ 'oss-' + es_major_version }}"
es_other_apt_url: "deb {{ es_repo_base }}/packages/{{ 'oss-' + es_major_version }}/apt stable main"
- name: Use the oss repo and package if xpack is not being used
- name: Use the oss repo and package
set_fact:
es_repo_name: "{{ 'oss-' + es_major_version }}"
es_other_repo_name: "{{ es_major_version }}"
@ -22,7 +30,7 @@
es_package_name: "elasticsearch-oss"
es_other_package_name: "elasticsearch"
when:
- not es_enable_xpack
- oss_version
- name: Set the URL scheme to https if SSL/TLS is enabled
set_fact: