Skip to content

Commit a75748f

Browse files
zerwestbauriedel
andauthored
use a unique name for the ca cert on the ansible controller (#382)
avoid mixing CA certs if we have multiple elasticsearch nodes (standalone or clusters) --------- Co-authored-by: Tobias Bauriedel <[email protected]>
1 parent 608aa6e commit a75748f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

roles/elasticsearch/tasks/elasticsearch-security.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@
264264
- name: Fetch ca certificate from ca host to Ansible controller
265265
ansible.builtin.fetch:
266266
src: "{{ elasticstack_ca_dir }}/ca.crt"
267-
dest: "{{ lookup('config', 'DEFAULT_LOCAL_TMP') | dirname }}/ca.crt"
267+
dest: "{{ lookup('config', 'DEFAULT_LOCAL_TMP') | dirname }}/{{ elasticstack_ca_host }}.crt"
268268
flat: yes
269269
when: inventory_hostname == elasticstack_ca_host
270270
tags:
@@ -297,8 +297,8 @@
297297

298298
- name: Copy the ca certificate to elasticsearch nodes
299299
ansible.builtin.copy:
300-
src: "{{ lookup('config', 'DEFAULT_LOCAL_TMP') | dirname }}/ca.crt"
301-
dest: "/etc/elasticsearch/certs"
300+
src: "{{ lookup('config', 'DEFAULT_LOCAL_TMP') | dirname }}/{{ elasticstack_ca_host }}.crt"
301+
dest: "/etc/elasticsearch/certs/ca.crt"
302302
owner: root
303303
group: elasticsearch
304304
mode: 0640

0 commit comments

Comments
 (0)