From 01d4cfc1288adaa0d7c2f78e7fe19ca4eba880ec Mon Sep 17 00:00:00 2001 From: Jose M Date: Mon, 5 Aug 2019 15:01:21 +0200 Subject: [PATCH] Implemented tasks to import custom key and cert from Ansible master --- .../tasks/xpack_security.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/roles/elastic-stack/ansible-elasticsearch/tasks/xpack_security.yml b/roles/elastic-stack/ansible-elasticsearch/tasks/xpack_security.yml index 3d9f3f7d..d84e1c31 100644 --- a/roles/elastic-stack/ansible-elasticsearch/tasks/xpack_security.yml +++ b/roles/elastic-stack/ansible-elasticsearch/tasks/xpack_security.yml @@ -39,6 +39,22 @@ when: - node_certs_generator +- name: Importing custom CA key + copy: + src: "{{ master_certs_destination }}/ca/{{ ca_key_name }}" + dest: "{{ node_certs_source }}/{{ ca_key_name }}" + when: + - not generate_CA + tags: xpack-security + +- name: Importing custom CA cert + copy: + src: "{{ master_certs_destination }}/ca/{{ ca_cert_name }}" + dest: "{{ node_certs_source }}/{{ ca_cert_name }}" + when: + - not generate_CA + tags: xpack-security + - name: Generating certificates for Elasticsearch security (generating CA) shell: >- /usr/share/elasticsearch/bin/elasticsearch-certutil cert ca --pem --in