From f67eae6eb0641c71647e9d80eaee30abf027fb78 Mon Sep 17 00:00:00 2001 From: Dejon Gill Date: Mon, 23 Apr 2018 22:18:43 -0700 Subject: [PATCH 1/6] bump es release version --- .kitchen.yml | 2 +- defaults/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.kitchen.yml b/.kitchen.yml index a8d440a..6425c86 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -21,7 +21,7 @@ provisioner: extra_vars: es_major_version: "<%= ENV['VERSION'] %>" <% if ENV['VERSION'] == '5.x' %> - es_version: '5.6.8' + es_version: '5.6.9' <% end %> <% end %> diff --git a/defaults/main.yml b/defaults/main.yml index e72e4f2..ad2be6e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,6 +1,6 @@ --- es_major_version: "6.x" -es_version: "6.2.3" +es_version: "6.2.4" es_version_lock: false es_use_repository: true es_templates_fileglob: "files/templates/*.json" From 7640a0383a99f698ef1c9949f22cdeb5b51579bc Mon Sep 17 00:00:00 2001 From: Jeffrey E Date: Thu, 3 May 2018 06:37:50 +0200 Subject: [PATCH 2/6] Update elasticsearch.yml.j2 --- templates/elasticsearch.yml.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/elasticsearch.yml.j2 b/templates/elasticsearch.yml.j2 index 56df843..4c30655 100644 --- a/templates/elasticsearch.yml.j2 +++ b/templates/elasticsearch.yml.j2 @@ -23,7 +23,7 @@ path.data: {{ data_dirs | array_to_str }} path.logs: {{ log_dir }} -{% if es_path_repo %} +{% if es_path_repo is defined %} path.repo: {{ es_path_repo }} {% endif %} @@ -67,4 +67,4 @@ xpack.notification.email: password: {{ es_mail_config['pass'] }} {% endif %} -{% endif %} \ No newline at end of file +{% endif %} From 4caefef9615b84030fb61cecc06b78c6a7b5ba8d Mon Sep 17 00:00:00 2001 From: Jeffrey E Date: Thu, 3 May 2018 07:23:24 +0200 Subject: [PATCH 3/6] Added es_action_auto_create_index: true --- defaults/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/defaults/main.yml b/defaults/main.yml index ad2be6e..524f65d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -22,6 +22,7 @@ es_config_log4j2: log4j2.properties.j2 es_pid_dir: "/var/run/elasticsearch" 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_map_count: 262144 From 11a1e4b38a14a8d432d4edd4423e98d75f5f57d8 Mon Sep 17 00:00:00 2001 From: Jeffrey E Date: Thu, 3 May 2018 07:33:17 +0200 Subject: [PATCH 4/6] Adjust variable name to match standard --- templates/elasticsearch.yml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/elasticsearch.yml.j2 b/templates/elasticsearch.yml.j2 index 4c30655..8baae10 100644 --- a/templates/elasticsearch.yml.j2 +++ b/templates/elasticsearch.yml.j2 @@ -27,7 +27,7 @@ path.logs: {{ log_dir }} path.repo: {{ es_path_repo }} {% endif %} -action.auto_create_index: {{ action_auto_create_index }} +action.auto_create_index: {{ es_action_auto_create_index }} {% if es_enable_xpack %} {% if not "security" in es_xpack_features %} From 96f3a87d95948ea02442ac54776058a7cb23a44d Mon Sep 17 00:00:00 2001 From: Jeffrey E Date: Thu, 3 May 2018 16:27:27 +0200 Subject: [PATCH 5/6] Fixed documentation Added documentation for es_action_auto_create_index and fixed the order --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bc93e44..e4d0ac6 100644 --- a/README.md +++ b/README.md @@ -338,11 +338,13 @@ In addition to es_config, the following parameters allow the customization of th * ```es_start_service``` (true (default) or false) * ```es_plugins_reinstall``` (true or false (default) ) * ```es_plugins``` an array of plugin definitions e.g.: -* ```es_path_repo``` Sets the whitelist for allowing local back-up repositories ```yml es_plugins: - plugin: ingest-geoip ``` +* ```es_path_repo``` Sets the whitelist for allowing local back-up repositories +* ```es_action_auto_create_index ``` Sets the value for auto index creation, use the syntax below for specifying indexes (else true/false): + es_action_auto_create_index: '[".watches", ".triggered_watches", ".watcher-history-*"]' * ```es_allow_downgrades``` For development purposes only. (true or false (default) ) * ```es_java_install``` If set to false, Java will not be installed. (true (default) or false) * ```update_java``` Updates Java to the latest version. (true or false (default)) From da527ec19b8ed59e3239419bc6257e1629198806 Mon Sep 17 00:00:00 2001 From: Jeffrey E Date: Thu, 3 May 2018 16:29:17 +0200 Subject: [PATCH 6/6] Added support for providing an array with indices --- templates/elasticsearch.yml.j2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/templates/elasticsearch.yml.j2 b/templates/elasticsearch.yml.j2 index 8baae10..d68a0dc 100644 --- a/templates/elasticsearch.yml.j2 +++ b/templates/elasticsearch.yml.j2 @@ -27,7 +27,13 @@ path.logs: {{ log_dir }} path.repo: {{ es_path_repo }} {% endif %} +{% if es_action_auto_create_index == true %} +action.auto_create_index: true +{% elif not es_action_auto_create_index %} +action.auto_create_index: false +{% else %} action.auto_create_index: {{ es_action_auto_create_index }} +{% endif %} {% if es_enable_xpack %} {% if not "security" in es_xpack_features %}