Move SSL config into security conditional

This commit is contained in:
Nathan Young 2019-10-11 16:16:53 +01:00
parent 45ef5a467c
commit 51eb05b6de
No known key found for this signature in database
GPG key ID: EB5E14327B10D023

View file

@ -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 %}