Additional tests + support for empty es_config + documentation
This commit is contained in:
parent
e98b74ab28
commit
b2997cc0bc
9 changed files with 101 additions and 63 deletions
|
|
@ -3,14 +3,16 @@
|
|||
- fail: msg="es_instance_name must be specified"
|
||||
when: es_instance_name is not defined
|
||||
|
||||
- set_fact: multi_cast={{ (es_version | version_compare('2.0', '<') and es_config['discovery.zen.ping.multicast.enabled'] is not defined) or es_config['discovery.zen.ping.multicast.enabled']}}
|
||||
|
||||
- fail: msg="Parameter 'http.port' must be defined when multicast is disabled"
|
||||
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
|
||||
when: not multi_cast 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 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
|
||||
when: not multi_cast 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 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
|
||||
when: not multi_cast and es_config['discovery.zen.ping.unicast.hosts'] is not defined
|
||||
|
||||
#If the user attempts to lock memory they must specify a heap size
|
||||
- fail: msg="If locking memory with bootstrap.mlockall a heap size must be specified"
|
||||
|
|
|
|||
|
|
@ -128,6 +128,7 @@
|
|||
|
||||
- stat: path=/usr/lib/systemd/system/elasticsearch.service
|
||||
register: systemd_service
|
||||
when: es_config['bootstrap.mlockall'] is defined and es_config['bootstrap.mlockall'] == True
|
||||
|
||||
- name: Configure systemd
|
||||
lineinfile: dest=/usr/lib/systemd/system/elasticsearch.service regexp="^LimitMEMLOCK" insertafter="^#LimitMEMLOCK" line="LimitMEMLOCK=infinity"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue