Certs generation command update
This commit is contained in:
parent
67b3b320f9
commit
eb133c4720
@ -10,7 +10,7 @@
|
||||
|
||||
- name: Copy the certificates from local to the Manager instance
|
||||
copy:
|
||||
src: "{{ local_certs_path }}/certs/{{ item }}"
|
||||
src: "{{ local_certs_path }}/wazuh-certificates/{{ item }}"
|
||||
dest: "{{ filebeat_ssl_dir }}"
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
- name: Copy the certificates from local to the Wazuh dashboard instance
|
||||
copy:
|
||||
src: "{{ local_certs_path }}/certs/{{ item }}"
|
||||
src: "{{ local_certs_path }}/wazuh-certificates/{{ item }}"
|
||||
dest: /etc/wazuh-dashboard/certs/
|
||||
mode: 0644
|
||||
with_items:
|
||||
|
||||
@ -19,13 +19,13 @@
|
||||
|
||||
- name: Local action | Check that the generation tool exists
|
||||
stat:
|
||||
path: "{{ local_certs_path }}/wazuh-cert-tool.sh"
|
||||
path: "{{ local_certs_path }}/wazuh-certs-tool.sh"
|
||||
register: tool_package
|
||||
|
||||
- name: Local action | Download certificates generation tool
|
||||
get_url:
|
||||
url: "{{ certs_gen_tool_url }}"
|
||||
dest: "{{ local_certs_path }}/wazuh-cert-tool.sh"
|
||||
dest: "{{ local_certs_path }}/wazuh-certs-tool.sh"
|
||||
when: not tool_package.stat.exists
|
||||
|
||||
- name: Local action | Prepare the certificates generation template file
|
||||
@ -37,12 +37,12 @@
|
||||
|
||||
- name: Local action | Generate the node & admin certificates in local
|
||||
command: >-
|
||||
bash {{ local_certs_path }}/wazuh-cert-tool.sh
|
||||
bash {{ local_certs_path }}/wazuh-certs-tool.sh -A
|
||||
become: yes
|
||||
|
||||
- name: Get Certificate files
|
||||
find:
|
||||
paths: "{{ local_certs_path }}/certs"
|
||||
paths: "{{ local_certs_path }}/wazuh-certificates"
|
||||
patterns: "*"
|
||||
register: certificate_files
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
- name: Copy the node & admin certificates to Wazuh indexer cluster
|
||||
copy:
|
||||
src: "{{ local_certs_path }}/certs/{{ item }}"
|
||||
src: "{{ local_certs_path }}/wazuh-certificates/{{ item }}"
|
||||
dest: "{{ indexer_conf_path }}/certs/"
|
||||
mode: 0644
|
||||
become: yes
|
||||
|
||||
Loading…
Reference in New Issue
Block a user