Add SSL keystore and truststore
This commit is contained in:
parent
6811cde9db
commit
45ef5a467c
5 changed files with 41 additions and 8 deletions
|
|
@ -4,20 +4,28 @@
|
|||
dest: "{{ es_ssl_certificate_path }}"
|
||||
state: directory
|
||||
|
||||
- name: Upload HTTP SSL/TLS certificates
|
||||
- name: Upload SSL/TLS keystore and truststore
|
||||
copy:
|
||||
src: "{{ item }}"
|
||||
dest: "{{ es_ssl_certificate_path }}/{{ item | basename }}"
|
||||
with_items:
|
||||
- "{{ es_ssl_key }}"
|
||||
- "{{ es_ssl_certificate }}"
|
||||
when: es_enable_http_ssl|bool or es_enable_transport_ssl|bool
|
||||
when: es_ssl_keystore and es_ssl_truststore
|
||||
register: copy_keystores
|
||||
|
||||
- local_action: stat path="{{ role_path }}/files/{{ es_ssl_certificate_authority }}"
|
||||
register: es_cafile
|
||||
- name: Upload SSL/TLS key and certificate
|
||||
copy:
|
||||
src: "{{ item }}"
|
||||
dest: "{{ es_ssl_certificate_path }}/{{ item | basename }}"
|
||||
with_items:
|
||||
- "{{ es_ssl_key }}"
|
||||
- "{{ es_ssl_certificate }}"
|
||||
when: es_ssl_key and es_ssl_certificate
|
||||
register: copy_certificates
|
||||
|
||||
- name: Upload SSL Certificate Authority
|
||||
copy:
|
||||
src: "{{ es_ssl_certificate_authority }}"
|
||||
dest: "{{ es_ssl_certificate_path }}/{{ es_ssl_certificate_authority | basename }}"
|
||||
when: es_cafile.stat.exists|bool and es_cafile.stat.isreg|bool
|
||||
when: es_ssl_certificate_authority
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue