Merge pull request #206 from veger/fix_es5_issues

Initial PR for adding 5.x support. Please note, this is still in testing.
This commit is contained in:
Jakob Reiter 2016-12-07 01:16:45 +01:00 committed by GitHub
commit 2a27c76bff
9 changed files with 226 additions and 7 deletions

View file

@ -49,6 +49,18 @@
- name: Copy Logging.yml File for Instance
template: src=logging.yml.j2 dest={{conf_dir}}/logging.yml owner={{ es_user }} group={{ es_group }} mode=0644 force=yes
notify: restart elasticsearch
when: es_version | version_compare('5.0', '<')
- name: Copy log4j2.properties File for Instance
template: src=log4j2.properties.j2 dest={{conf_dir}}/log4j2.properties owner={{ es_user }} group={{ es_group }} mode=0644 force=yes
notify: restart elasticsearch
when: es_version | version_compare('5.0', '>=')
# Copy the JVM Options (5.x only)
- name: Copy jvm.options File for Instance
template: src=jvm.options.j2 dest={{conf_dir}}/jvm.options owner={{ es_user }} group={{ es_group }} mode=0644 force=yes
notify: restart elasticsearch
when: es_version | version_compare('5.0', '>=')
#Clean up un-wanted package scripts to avoid confusion
@ -72,3 +84,8 @@
- name: Delete Default Logging File
file: dest=/etc/elasticsearch/logging.yml state=absent
- name: Delete Default Logging File (5.x)
file: dest=/etc/elasticsearch/log4j2.properties state=absent
- name: Delete Default JVM Options File (5.x)
file: dest=/etc/elasticsearch/jvm.options state=absent

View file

@ -18,8 +18,8 @@
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"
when: es_config['bootstrap.mlockall'] is defined and es_config['bootstrap.mlockall'] == True and es_heap_size is not defined
- fail: msg="If locking memory with bootstrap.mlockall (or bootstrap.memory_lock) a heap size must be specified"
when: (es_config['bootstrap.mlockall'] is defined or es_config['bootstrap.memory_lock'] is defined) and es_config['bootstrap.mlockall'] == True and es_heap_size is not defined
#Don't support xpack on versions < 2.0
- fail: msg="Use of the xpack notation is not supported on versions < 2.0. Marvel-agent and watcher can be installed as plugins. Version > 2.0 is required for shield."
@ -32,7 +32,7 @@
- set_fact: instance_default_file={{default_file | dirname}}/{{es_instance_name}}_{{default_file | basename}}
- set_fact: instance_init_script={{init_script | dirname }}/{{es_instance_name}}_{{init_script | basename}}
- set_fact: conf_dir={{ es_conf_dir }}/{{es_instance_name}}
- set_fact: m_lock_enabled={{ es_config['bootstrap.mlockall'] is defined and es_config['bootstrap.mlockall'] == True }}
- set_fact: m_lock_enabled={{ (es_config['bootstrap.mlockall'] is defined and es_config['bootstrap.mlockall'] == True) or (es_config['bootstrap.memory_lock'] is defined and es_config['bootstrap.memory_lock'] == True) }}
#Use systemd for the following distributions:
#Ubuntu 15 and up