Add SSL keystore and truststore

This commit is contained in:
Nathan Young 2019-10-11 16:09:05 +01:00
parent 6811cde9db
commit 45ef5a467c
No known key found for this signature in database
GPG key ID: EB5E14327B10D023
5 changed files with 41 additions and 8 deletions

View file

@ -58,19 +58,33 @@ xpack.notification.email:
{% if es_enable_http_ssl | bool %}
xpack.security.http.ssl.enabled: true
{% if es_ssl_keystore and es_ssl_truststore %}
xpack.security.http.ssl.keystore.path: : "{{ es_ssl_certificate_path }}/{{ es_ssl_keystore | basename }}"
xpack.security.http.ssl.truststore.path: "{{ es_ssl_certificate_path }}/{{ es_ssl_truststore | basename }}"
{% elif es_ssl_key and es_ssl_certificate%}
xpack.security.http.ssl.key: "{{ es_ssl_certificate_path }}/{{ es_ssl_key | basename }}"
xpack.security.http.ssl.certificate: "{{ es_ssl_certificate_path }}/{{ es_ssl_certificate | basename }}"
#xpack.security.http.ssl.client_authentication: optional
{% if es_ssl_certificate_authority %}
xpack.security.http.ssl.certificate_authorities: "{{ es_ssl_certificate_path }}/{{ es_ssl_certificate_authority | basename }}"
{% endif %}
{% endif %}
{% else %}
# xpack.security.http.ssl.enabled: false
{% endif %}
{% if es_enable_transport_ssl | bool %}
xpack.security.transport.ssl.enabled: true
#xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.verification_mode: {{ es_ssl_verification_mode }}
{% if es_ssl_keystore and es_ssl_truststore %}
xpack.security.transport.ssl.keystore.path: : "{{ es_ssl_certificate_path }}/{{ es_ssl_keystore | basename }}"
xpack.security.transport.ssl.truststore.path: "{{ es_ssl_certificate_path }}/{{ es_ssl_truststore | basename }}"
{% elif es_ssl_key and es_ssl_certificate%}
xpack.security.transport.ssl.key: "{{ es_ssl_certificate_path }}/{{ es_ssl_key | basename }}"
xpack.security.transport.ssl.certificate: "{{ es_ssl_certificate_path }}/{{ es_ssl_certificate | basename }}"
{% if es_ssl_certificate_authority %}
xpack.security.transport.ssl.certificate_authorities: "{{ es_ssl_certificate_path }}/{{ es_ssl_certificate_authority | basename }}"
{% endif %}
{% endif %}
{% else %}
# xpack.security.transport.ssl.enabled: false
{% endif %}