Merge branch 'master' into es_repo_base
This commit is contained in:
commit
59de0102a8
12 changed files with 21 additions and 19 deletions
|
|
@ -28,7 +28,7 @@ es_data_dirs: "/var/lib/elasticsearch"
|
|||
es_log_dir: "/var/log/elasticsearch"
|
||||
es_action_auto_create_index: true
|
||||
es_max_open_files: 65536
|
||||
es_max_threads: "{{ 2048 if ( es_version | version_compare('6.0.0', '<')) else 8192 }}"
|
||||
es_max_threads: "{{ 2048 if ( es_version is version_compare('6.0.0', '<')) else 8192 }}"
|
||||
es_max_map_count: 262144
|
||||
es_allow_downgrades: false
|
||||
es_xpack_features: ["alerting","monitoring","graph","ml","security"]
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
- name: Detect if es_version is before X-Pack was open and included
|
||||
set_fact:
|
||||
es_open_xpack: false
|
||||
when: "es_version | version_compare('6.3.0', '<')"
|
||||
when: "es_version is version_compare('6.3.0', '<')"
|
||||
|
||||
- name: If this is an older version we need to install X-Pack as a plugin and use a differet users command
|
||||
set_fact:
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
register: elasticsearch_package
|
||||
failed_when: False
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
|
||||
- name: stop elasticsearch
|
||||
service:
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
register: open_jdk
|
||||
ignore_errors: yes
|
||||
changed_when: false
|
||||
check_mode: no
|
||||
|
||||
#https://github.com/docker-library/openjdk/issues/19 - ensures tests pass due to java 8 broken certs
|
||||
- name: refresh the java ca-certificates
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@
|
|||
|
||||
# If playbook runs too fast, Native commands could fail as the Native Realm is not yet up
|
||||
- name: Wait 15 seconds for the Native Relm to come up
|
||||
pause: seconds=15
|
||||
command: sleep 15
|
||||
when: manage_native_realm
|
||||
|
||||
- name: activate-license
|
||||
|
|
|
|||
|
|
@ -20,4 +20,4 @@
|
|||
- name: Set elasticsearch.keystore Permissions
|
||||
become: yes
|
||||
file: state=file path={{ conf_dir }}/elasticsearch.keystore owner={{ es_user }} group={{ es_group }}
|
||||
when: es_enable_xpack and "security" in es_xpack_features and (es_version | version_compare('6.0.0', '>'))
|
||||
when: es_enable_xpack and "security" in es_xpack_features and (es_version is version_compare('6.0.0', '>'))
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#-----------------------------Create Bootstrap User-----------------------------------
|
||||
### START BLOCK elasticsearch keystore ###
|
||||
- name: create the elasticsearch keystore
|
||||
when: (es_enable_xpack and "security" in es_xpack_features) and (es_version | version_compare('6.0.0', '>'))
|
||||
when: (es_enable_xpack and "security" in es_xpack_features) and (es_version is version_compare('6.0.0', '>'))
|
||||
block:
|
||||
- name: create the keystore if it doesn't exist yet
|
||||
become: yes
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ node.name: {{inventory_hostname}}-{{es_instance_name}}
|
|||
|
||||
# Path to directory containing configuration (this file and logging.yml):
|
||||
|
||||
{% if (es_version | version_compare('6.0.0', '<')) %}
|
||||
{% if (es_version is version_compare('6.0.0', '<')) %}
|
||||
path.conf: {{ conf_dir }}
|
||||
{% endif %}
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ fi
|
|||
# Define other required variables
|
||||
PID_FILE="$PID_DIR/$NAME.pid"
|
||||
DAEMON=$ES_HOME/bin/elasticsearch
|
||||
{% if (es_version | version_compare('6.0.0', '<')) %}
|
||||
{% if (es_version is version_compare('6.0.0', '<')) %}
|
||||
DAEMON_OPTS="-d -p $PID_FILE -Edefault.path.logs=$LOG_DIR -Edefault.path.data=$DATA_DIR -Edefault.path.conf=$CONF_DIR"
|
||||
{% else %}
|
||||
DAEMON_OPTS="-d -p $PID_FILE"
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ start() {
|
|||
cd $ES_HOME
|
||||
echo -n $"Starting $prog: "
|
||||
# if not running, start it up here, usually something like "daemon $exec"
|
||||
{% if (es_version | version_compare('6.0.0', '<')) %}
|
||||
{% if (es_version is version_compare('6.0.0', '<')) %}
|
||||
daemon --user $ES_USER --pidfile $pidfile $exec -p $pidfile -d -Edefault.path.logs=$LOG_DIR -Edefault.path.data=$DATA_DIR -Edefault.path.conf=$CONF_DIR
|
||||
{% else %}
|
||||
daemon --user $ES_USER --pidfile $pidfile $exec -p $pidfile -d
|
||||
|
|
|
|||
|
|
@ -11,14 +11,14 @@ appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n
|
|||
|
||||
appender.rolling.type = RollingFile
|
||||
appender.rolling.name = rolling
|
||||
{% if (es_version | version_compare('6.0.0', '<')) %}
|
||||
{% if (es_version is version_compare('6.0.0', '<')) %}
|
||||
appender.rolling.fileName = ${sys:es.logs}.log
|
||||
{% else %}
|
||||
appender.rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}.log
|
||||
{% endif %}
|
||||
appender.rolling.layout.type = PatternLayout
|
||||
appender.rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%.-10000m%n
|
||||
{% if (es_version | version_compare('6.0.0', '<')) %}
|
||||
{% if (es_version is version_compare('6.0.0', '<')) %}
|
||||
appender.rolling.filePattern = ${sys:es.logs}-%d{yyyy-MM-dd}.log
|
||||
{% else %}
|
||||
appender.rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}-%d{yyyy-MM-dd}-%i.log.gz
|
||||
|
|
@ -27,7 +27,7 @@ appender.rolling.policies.type = Policies
|
|||
appender.rolling.policies.time.type = TimeBasedTriggeringPolicy
|
||||
appender.rolling.policies.time.interval = 1
|
||||
appender.rolling.policies.time.modulate = true
|
||||
{% if (es_version | version_compare('6.0.0', '>')) %}
|
||||
{% if (es_version is version_compare('6.0.0', '>')) %}
|
||||
appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
|
||||
appender.rolling.policies.size.size = 128MB
|
||||
appender.rolling.strategy.type = DefaultRolloverStrategy
|
||||
|
|
@ -45,14 +45,14 @@ rootLogger.appenderRef.rolling.ref = rolling
|
|||
|
||||
appender.deprecation_rolling.type = RollingFile
|
||||
appender.deprecation_rolling.name = deprecation_rolling
|
||||
{% if (es_version | version_compare('6.0.0', '<')) %}
|
||||
{% if (es_version is version_compare('6.0.0', '<')) %}
|
||||
appender.deprecation_rolling.fileName = ${sys:es.logs}_deprecation.log
|
||||
{% else %}
|
||||
appender.deprecation_rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_deprecation.log
|
||||
{% endif %}
|
||||
appender.deprecation_rolling.layout.type = PatternLayout
|
||||
appender.deprecation_rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%.-10000m%n
|
||||
{% if (es_version | version_compare('6.0.0', '<')) %}
|
||||
{% if (es_version is version_compare('6.0.0', '<')) %}
|
||||
appender.deprecation_rolling.filePattern = ${sys:es.logs}_deprecation-%i.log.gz
|
||||
{% else %}
|
||||
appender.deprecation_rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_deprecation-%i.log.gz
|
||||
|
|
@ -70,14 +70,14 @@ logger.deprecation.additivity = false
|
|||
|
||||
appender.index_search_slowlog_rolling.type = RollingFile
|
||||
appender.index_search_slowlog_rolling.name = index_search_slowlog_rolling
|
||||
{% if (es_version | version_compare('6.0.0', '<')) %}
|
||||
{% if (es_version is version_compare('6.0.0', '<')) %}
|
||||
appender.index_search_slowlog_rolling.fileName = ${sys:es.logs}_index_search_slowlog.log
|
||||
{% else %}
|
||||
appender.index_search_slowlog_rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_index_search_slowlog.log
|
||||
{% endif %}
|
||||
appender.index_search_slowlog_rolling.layout.type = PatternLayout
|
||||
appender.index_search_slowlog_rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %marker%.-10000m%n
|
||||
{% if (es_version | version_compare('6.0.0', '<')) %}
|
||||
{% if (es_version is version_compare('6.0.0', '<')) %}
|
||||
appender.index_search_slowlog_rolling.filePattern = ${sys:es.logs}_index_search_slowlog-%d{yyyy-MM-dd}.log
|
||||
{% else %}
|
||||
appender.index_search_slowlog_rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_index_search_slowlog-%d{yyyy-MM-dd}.log
|
||||
|
|
@ -94,14 +94,14 @@ logger.index_search_slowlog_rolling.additivity = false
|
|||
|
||||
appender.index_indexing_slowlog_rolling.type = RollingFile
|
||||
appender.index_indexing_slowlog_rolling.name = index_indexing_slowlog_rolling
|
||||
{% if (es_version | version_compare('6.0.0', '<')) %}
|
||||
{% if (es_version is version_compare('6.0.0', '<')) %}
|
||||
appender.index_indexing_slowlog_rolling.fileName = ${sys:es.logs}_index_indexing_slowlog.log
|
||||
{% else %}
|
||||
appender.index_indexing_slowlog_rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_index_indexing_slowlog.log
|
||||
{% endif %}
|
||||
appender.index_indexing_slowlog_rolling.layout.type = PatternLayout
|
||||
appender.index_indexing_slowlog_rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %marker%.-10000m%n
|
||||
{% if (es_version | version_compare('6.0.0', '<')) %}
|
||||
{% if (es_version is version_compare('6.0.0', '<')) %}
|
||||
appender.index_indexing_slowlog_rolling.filePattern = ${sys:es.logs}_index_indexing_slowlog-%d{yyyy-MM-dd}.log
|
||||
{% else %}
|
||||
appender.index_indexing_slowlog_rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_index_indexing_slowlog-%d{yyyy-MM-dd}.log
|
||||
|
|
|
|||
|
|
@ -20,13 +20,13 @@ WorkingDirectory={{es_home}}
|
|||
User={{es_user}}
|
||||
Group={{es_group}}
|
||||
|
||||
{% if (es_version | version_compare('6.0.0', '<')) %}
|
||||
{% if (es_version is version_compare('6.0.0', '<')) %}
|
||||
ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec
|
||||
{% endif %}
|
||||
|
||||
ExecStart={{es_home}}/bin/elasticsearch \
|
||||
-p ${PID_DIR}/elasticsearch.pid \
|
||||
{% if (es_version | version_compare('6.0.0', '<')) %}
|
||||
{% if (es_version is version_compare('6.0.0', '<')) %}
|
||||
-Edefault.path.logs=${LOG_DIR} \
|
||||
-Edefault.path.data=${DATA_DIR} \
|
||||
-Edefault.path.conf=${CONF_DIR} \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue