From b8203475687d1c394a3998d413639b07ac4ae192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Correa=20Rodr=C3=ADguez?= Date: Thu, 1 Feb 2024 16:13:41 +0100 Subject: [PATCH] Splitted wazuh-keystore generation task --- .../ansible-wazuh-manager/tasks/main.yml | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/roles/wazuh/ansible-wazuh-manager/tasks/main.yml b/roles/wazuh/ansible-wazuh-manager/tasks/main.yml index e8de0338..ba1c5080 100644 --- a/roles/wazuh/ansible-wazuh-manager/tasks/main.yml +++ b/roles/wazuh/ansible-wazuh-manager/tasks/main.yml @@ -37,6 +37,22 @@ - include_tasks: "Debian.yml" when: ansible_os_family == "Debian" +- name: Generate the wazuh-keystore (username) + shell: > + /var/ossec/bin/wazuh-keystore -f indexer -k username -v {{ indexer_security_user }} + notify: restart wazuh-manager + tags: + - init + - config + +- name: Generate the wazuh-keystore (password) + shell: > + /var/ossec/bin/wazuh-keystore -f indexer -k password -v {{ indexer_security_password }} + notify: restart wazuh-manager + tags: + - init + - config + - name: Install expect package: name: expect @@ -252,15 +268,6 @@ - init - config -- name: Generate the wazuh-keystore - shell: > - /var/ossec/bin/wazuh-keystore -f indexer -k username -v {{ indexer_security_user }} - /var/ossec/bin/wazuh-keystore -f indexer -k password -v {{ indexer_security_password }} - notify: restart wazuh-manager - tags: - - init - - config - - name: Ossec-authd password template: src: authd_pass.j2