feat: add SSL certificate
This commit is contained in:
parent
96e0ab4b64
commit
30f4484bd6
4 changed files with 93 additions and 1 deletions
tasks
|
@ -10,12 +10,34 @@
|
|||
notify: Restart elasticsearch
|
||||
tags: elasticsearch
|
||||
|
||||
- name: Copy SSL certificate
|
||||
ansible.builtin.copy:
|
||||
content: "{{ elasticsearch_ssl_certificate }}"
|
||||
dest: "{{ elasticsearch_full_config['xpack.security.transport.ssl.certificate'] }}"
|
||||
owner: root
|
||||
group: elasticsearch
|
||||
mode: "0640"
|
||||
when: "'xpack.security.transport.ssl.certificate' in elasticsearch_full_config"
|
||||
notify: Restart elasticsearch
|
||||
tags: elasticsearch
|
||||
|
||||
- name: Copy SSL key
|
||||
ansible.builtin.copy:
|
||||
content: "{{ elasticsearch_ssl_key }}"
|
||||
dest: "{{ elasticsearch_full_config['xpack.security.transport.ssl.key'] }}"
|
||||
owner: root
|
||||
group: elasticsearch
|
||||
mode: "0640"
|
||||
when: "'xpack.security.transport.ssl.key' in elasticsearch_full_config"
|
||||
notify: Restart elasticsearch
|
||||
tags: elasticsearch
|
||||
|
||||
- name: Copy config file
|
||||
ansible.builtin.copy:
|
||||
content: "{{ elasticsearch_full_config | to_yaml }}"
|
||||
dest: /etc/elasticsearch/elasticsearch.yml
|
||||
owner: root
|
||||
group: elasticsearch
|
||||
mode: 0640
|
||||
mode: "0640"
|
||||
notify: Restart elasticsearch
|
||||
tags: elasticsearch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue