mirror of
https://github.com/aljazceru/ansible-elasticsearch.git
synced 2025-12-17 17:14:20 +01:00
Require ports and unicast to be specified for 2.0
This commit is contained in:
@@ -4,13 +4,12 @@
|
||||
when: es_instance_name is not defined
|
||||
|
||||
- fail: msg="Parameter 'http.port' must be defined when multicast is disabled"
|
||||
when: es_config['discovery.zen.ping.multicast.enabled'] == false and es_config['http.port'] is not defined
|
||||
when: es_config['discovery.zen.ping.multicast.enabled'] == false or (es_version | version_compare('2.0', '>=') and es_config['discovery.zen.ping.multicast.enabled'] is not defined) and es_config['http.port'] is not defined
|
||||
|
||||
- fail: msg="Parameter 'transport.tcp.port' must be defined when multicast is disabled"
|
||||
when: es_config['discovery.zen.ping.multicast.enabled'] == false and es_config['transport.tcp.port'] is not defined
|
||||
when: es_config['discovery.zen.ping.multicast.enabled'] == false or (es_version | version_compare('2.0', '>=') and es_config['discovery.zen.ping.multicast.enabled'] is not defined) and es_config['transport.tcp.port'] is not defined
|
||||
|
||||
- fail: msg="Parameter 'discovery.zen.ping.unicast.hosts' must be defined when multicast is disabled"
|
||||
when: es_config['discovery.zen.ping.multicast.enabled'] == false and es_config['discovery.zen.ping.unicast.hosts'] is not defined
|
||||
|
||||
when: es_config['discovery.zen.ping.multicast.enabled'] == false or (es_version | version_compare('2.0', '>=') and es_config['discovery.zen.ping.multicast.enabled'] is not defined) and es_config['discovery.zen.ping.unicast.hosts'] is not defined
|
||||
|
||||
# If multicast is false OR if > 2.0 AND not defined as true (or explicitly false)
|
||||
@@ -8,5 +8,4 @@
|
||||
vars:
|
||||
es_scripts: false
|
||||
es_templates: false
|
||||
es_version_lock: false
|
||||
es_config: { "discovery.zen.ping.multicast.enabled": true }
|
||||
es_version_lock: false
|
||||
Reference in New Issue
Block a user