30 lines
1.4 KiB
YAML
30 lines
1.4 KiB
YAML
---
|
|
|
|
# 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_repo_name: "{{ es_major_version }}"
|
|
es_package_name: "elasticsearch"
|
|
es_other_package_name: "elasticsearch-oss"
|
|
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
|
|
set_fact:
|
|
es_repo_name: "{{ 'oss-' + es_major_version }}"
|
|
es_other_repo_name: "{{ es_major_version }}"
|
|
es_other_apt_url: "deb {{ es_repo_base }}/packages/{{ es_major_version }}/apt stable main"
|
|
es_package_name: "elasticsearch-oss"
|
|
es_other_package_name: "elasticsearch"
|
|
when:
|
|
- not es_enable_xpack
|
|
|
|
- name: Set the URL scheme based if http ssl/tls is enabled
|
|
set_fact:
|
|
es_api_scheme: "https"
|
|
when: es_enable_http_ssl
|