From 51eb05b6deff15d0c8231b2f7d387ac78868a3c5 Mon Sep 17 00:00:00 2001 From: Nathan Young Date: Fri, 11 Oct 2019 16:16:53 +0100 Subject: [PATCH] Move SSL config into security conditional --- templates/elasticsearch.yml.j2 | 36 +++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/templates/elasticsearch.yml.j2 b/templates/elasticsearch.yml.j2 index 12e89fb..e1c226c 100644 --- a/templates/elasticsearch.yml.j2 +++ b/templates/elasticsearch.yml.j2 @@ -37,24 +37,6 @@ action.auto_create_index: {{ es_action_auto_create_index }} {% if es_enable_xpack and es_api_basic_auth_username is defined and es_api_basic_auth_password is defined %} xpack.security.enabled: true -{% endif %} - -{% if es_mail_config is defined %} -xpack.notification.email: - account: - {{ es_mail_config['account'] }}: - profile: {{ es_mail_config['profile'] }} - email_defaults: - from: {{ es_mail_config['from'] }} - smtp: - auth: {{ es_mail_config['require_auth'] }} - host: {{ es_mail_config['host'] }} - port: {{ es_mail_config['port'] }} - {% if es_mail_config['require_auth'] == true -%} - user: {{ es_mail_config['user'] }} - password: {{ es_mail_config['pass'] }} - {%- endif %} -{% endif %} {% if es_enable_http_ssl | bool %} xpack.security.http.ssl.enabled: true @@ -88,3 +70,21 @@ xpack.security.transport.ssl.certificate_authorities: "{{ es_ssl_certificate_pat {% else %} # xpack.security.transport.ssl.enabled: false {% endif %} +{% endif %} + +{% if es_mail_config is defined %} +xpack.notification.email: + account: + {{ es_mail_config['account'] }}: + profile: {{ es_mail_config['profile'] }} + email_defaults: + from: {{ es_mail_config['from'] }} + smtp: + auth: {{ es_mail_config['require_auth'] }} + host: {{ es_mail_config['host'] }} + port: {{ es_mail_config['port'] }} + {% if es_mail_config['require_auth'] == true -%} + user: {{ es_mail_config['user'] }} + password: {{ es_mail_config['pass'] }} + {%- endif %} +{% endif %}