Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MVP - Ansible - Roles: wazuh-server role #1522

Closed
2 tasks done
YisDav opened this issue Jan 23, 2025 · 1 comment · Fixed by #1579
Closed
2 tasks done

MVP - Ansible - Roles: wazuh-server role #1522

YisDav opened this issue Jan 23, 2025 · 1 comment · Fixed by #1579
Assignees

Comments

@YisDav
Copy link
Member

YisDav commented Jan 23, 2025

Description

The ansible role for Wazuh manager (roles/wazuh-manager) is designed to streamline the installation and configuration of the Wazuh manager component.

For a more detailed description, please refer to the parent commit (#1493).

Tasks

  • Develop the Wazuh manager role. The playbook must support installation across all platforms, ensuring compatibility with the Central Components tier 1 OS versions and architectures.
  • Validate the role's functionality by testing it with all supported Wazuh manager environments.

Update

Remember to rename occurrences of “manager” to “server”.

@wazuhci wazuhci moved this to Backlog in XDR+SIEM/Release 5.0.0 Feb 6, 2025
@teddytpc1 teddytpc1 changed the title Ansible MVP - Roles: wazuh-manager role MVP - Ansible - Roles: wazuh-manager role Feb 6, 2025
@YisDav YisDav changed the title MVP - Ansible - Roles: wazuh-manager role MVP - Ansible - Roles: wazuh-server role Feb 6, 2025
@wazuhci wazuhci moved this from Backlog to In progress in XDR+SIEM/Release 5.0.0 Feb 26, 2025
@wazuhci wazuhci moved this from In progress to On hold in XDR+SIEM/Release 5.0.0 Feb 26, 2025
@wazuhci wazuhci moved this from On hold to In progress in XDR+SIEM/Release 5.0.0 Mar 3, 2025
@YisDav
Copy link
Member Author

YisDav commented Mar 12, 2025

Update

Tests have been carried out to verify the functioning of the Ansible role to perform the installation of Wazuh Server 5.0.0. The following operating systems were used to carry out the tests:

Tested OSs

Distribution Version Architecture
Ubuntu 24.04 x86_64
Debian 12 x86_64
Redhat 9 x86_64
CentOS Stream 9 x86_64
Amazon Linux 2 x86_64
Rocky Linux 9 x86_64

The deployment was carried out exclusively on amd64 hosts since packages are only available for this architecture; arm64 packages are not yet available.

Note

The tests were successful for both AIO (on each host) and distributed deployments (tested with a distributed setup across the 7 nodes).

Archive with all evidence files

evidence-1522.zip

Description Here is all included evidence of testing. This includes: execution outputs, screenshots, inventory and example playbook.

AIO

Accessing dashboard

Below is a screenshot of the Discovery -> Agents dashboard section. Here, you can see the logs of a successfully enrolled agent, demonstrating the proper functionality of the Wazuh (AIO) cluster deployed using Ansible.

Image

Ansible execution output

Below is a complete log of the execution results for the Ansible deployment of AIO.

Expand
PLAY [aio] *********************************************************************

TASK [Gathering Facts] *********************************************************
ok: [aio]

TASK [wazuh-indexer : include_vars] ********************************************
ok: [aio]

TASK [wazuh-indexer : include_vars] ********************************************
ok: [aio]

TASK [wazuh-indexer : Ensure wazuh-indexer package download directory exists] ***
changed: [aio]

TASK [wazuh-indexer : Amazon Linux | Install Amazon extras in Amazon Linux 2] ***
skipping: [aio]

TASK [wazuh-indexer : Amazon Linux | Configure vm.max_map_count] ***************
skipping: [aio]

TASK [wazuh-indexer : Amazon Linux | Update vm.max_map_count] ******************
skipping: [aio]

TASK [wazuh-indexer : RedHat/CentOS/Fedora | Install Indexer dependencies] *****
ok: [aio]

TASK [wazuh-indexer : RedHat/CentOS/Fedora (x86_64) | Download wazuh-indexer package] ***
changed: [aio]

TASK [wazuh-indexer : RedHat/CentOS/Fedora (aarch64) | Download wazuh-indexer package] ***
skipping: [aio]

TASK [wazuh-indexer : Debian-based | Install Indexer dependencies] *************
skipping: [aio]

TASK [wazuh-indexer : Debian-based (AMD64) | Download wazuh-indexer package] ***
skipping: [aio]

TASK [wazuh-indexer : Debian-based (ARM64) | Download wazuh-indexer package] ***
skipping: [aio]

TASK [wazuh-indexer : Linux CentOS/RedHat | Install wazuh-indexer using yum] ***
changed: [aio]

TASK [wazuh-indexer : Linux Debian | Install wazuh-indexer using apt] **********
skipping: [aio]

TASK [wazuh-indexer : Cert-gen | Check if certificates already exists] *********
ok: [aio -> localhost]

TASK [wazuh-indexer : Cert-gen | Remove existing certificates] *****************
changed: [aio -> localhost]

TASK [wazuh-indexer : Cert-gen | Check if configuration is defined correctly] ***
skipping: [aio]

TASK [wazuh-indexer : Cert-gen | Create local temporary directory for certificates generation (all certs)] ***
changed: [aio -> localhost]

TASK [wazuh-indexer : Cert-gen | Download certificates generation tool] ********
changed: [aio -> localhost]

TASK [wazuh-indexer : Cert-gen | Download base config.yml file] ****************
changed: [aio -> localhost]

TASK [wazuh-indexer : Cert-gen | Remove comments from config.yml file] *********
changed: [aio -> localhost]

TASK [wazuh-indexer : Cert-gen | Remove existing nodes sections (cluster mode)] ***
skipping: [aio]

TASK [wazuh-indexer : Cert-gen | Add indexer nodes section (cluster mode)] *****
skipping: [aio]

TASK [wazuh-indexer : Cert-gen | Add server nodes section (cluster mode)] ******
skipping: [aio]

TASK [wazuh-indexer : Cert-gen | Add dashboard nodes section (cluster mode)] ***
skipping: [aio]

TASK [wazuh-indexer : Cert-gen | Remove comments from config.yml file] *********
skipping: [aio]

TASK [wazuh-indexer : Cert-gen | Add indexer node section (single node mode)] ***
changed: [aio -> localhost]

TASK [wazuh-indexer : Cert-gen | Add server node section (single node mode)] ***
changed: [aio -> localhost]

TASK [wazuh-indexer : Cert-gen | Add dashboard node section (single node mode)] ***
changed: [aio -> localhost]

TASK [wazuh-indexer : Cert-gen | Remove empty lines from config.yml file] ******
changed: [aio -> localhost]

TASK [wazuh-indexer : Cert-gen | Generate certificates] ************************
changed: [aio -> localhost]

TASK [wazuh-indexer : Cert-gen | Copy certificates to each Wazuh indexer node] ***
changed: [aio] => (item=root-ca.pem)
changed: [aio] => (item=root-ca.key)
changed: [aio] => (item=node-1-key.pem)
changed: [aio] => (item=node-1.pem)
changed: [aio] => (item=admin-key.pem)
changed: [aio] => (item=admin.pem)

TASK [wazuh-indexer : Cert-gen | Rename indexer key certificate (1/2)] *********
changed: [aio]

TASK [wazuh-indexer : Cert-gen | Rename indexer certificate (2/2)] *************
changed: [aio]

TASK [wazuh-indexer : OpenSearch Config | Update network.host configuration] ***
changed: [aio]

TASK [wazuh-indexer : OpenSearch Config | Update node.name configuration] ******
ok: [aio]

TASK [wazuh-indexer : Remove existing nodes in cluster.initial_master_nodes] ***
skipping: [aio]

TASK [wazuh-indexer : OpenSearch Config | Update cluster.initial_master_nodes values] ***
skipping: [aio]

TASK [wazuh-indexer : OpenSearch Config | Remove cluster.initial_master_nodes for single-node cluster] ***
changed: [aio]

TASK [wazuh-indexer : OpenSearch Config | Uncomment discovery.seed_hosts line] ***
skipping: [aio]

TASK [wazuh-indexer : OpenSearch Config | Update discovery.seed_hosts value] ***
skipping: [aio]

TASK [wazuh-indexer : OpenSearch Config | Remove existing SSL configuration lines in plugins.security.nodes_dn] ***
changed: [aio]

TASK [wazuh-indexer : OpenSearch Config | Update SSL configuration values in plugins.security.nodes_dn] ***
changed: [aio]

TASK [wazuh-indexer : Add single-node discovery type if needed] ****************
changed: [aio]

TASK [wazuh-indexer : Reload systemd configuration] ****************************
ok: [aio]

TASK [wazuh-indexer : Ensure Wazuh indexer started and enabled] ****************
changed: [aio]

TASK [wazuh-indexer : Initialize Wazuh Indexer cluster] ************************
changed: [aio]

TASK [wazuh-indexer : Wait for Wazuh indexer API] ******************************
FAILED - RETRYING: [aio]: Wait for Wazuh indexer API (24 retries left).
ok: [aio]

TASK [wazuh-indexer : Reload systemd configuration] ****************************
ok: [aio]

TASK [wazuh-indexer : Remove Wazuh Indexer installation leftovers] *************
changed: [aio]

TASK [wazuh-server : include_vars] *********************************************
ok: [aio]

TASK [wazuh-server : include_vars] *********************************************
ok: [aio]

TASK [wazuh-server : Install Nginx] ********************************************
skipping: [aio]

TASK [wazuh-server : RHEL-based LB | Install Nginx stream module] **************
skipping: [aio]

TASK [wazuh-server : Install nginx-full package] *******************************
skipping: [aio]

TASK [wazuh-server : Make sure the /etc/nginx/modules directory exists] ********
skipping: [aio]

TASK [wazuh-server : Create symbolic link for ngx_stream_module.so [path1]] ****
skipping: [aio]

TASK [wazuh-server : Create symbolic link for ngx_stream_module.so [path2]] ****
skipping: [aio]

TASK [wazuh-server : Create symbolic link for ngx_stream_module.so [path3]] ****
skipping: [aio]

TASK [wazuh-server : Fail if Nginx stream module is not found] *****************
skipping: [aio]

TASK [wazuh-server : Start and enable Nginx service] ***************************
skipping: [aio]

TASK [wazuh-server : Gather available local users] *****************************
skipping: [aio]

TASK [wazuh-server : Set value for fact 'lb_user_group' (for 'nginx' user)] ****
skipping: [aio]

TASK [wazuh-server : Set value for fact 'lb_user_group' (for 'www-data' user)] ***
skipping: [aio]

TASK [wazuh-server : Make sure the /etc/nginx/ssl directory exists] ************
skipping: [aio]

TASK [wazuh-server : Generate self-signed SSL certificate] *********************
skipping: [aio]

TASK [wazuh-server : Rename the default Nginx configuration file] **************
skipping: [aio]

TASK [wazuh-server : Copy the Nginx configuration file] ************************
skipping: [aio]

TASK [wazuh-server : Restart Nginx service] ************************************
skipping: [aio]

TASK [wazuh-server : Retrieve local_configs_path directory information] ********
ok: [aio -> localhost]

TASK [wazuh-server : fail] *****************************************************
skipping: [aio]

TASK [wazuh-server : Ensure wazuh-server package download directory exists] ****
changed: [aio]

TASK [wazuh-server : RedHat/CentOS/Fedora (x86_64) | Download wazuh-server package] ***
changed: [aio]

TASK [wazuh-server : RedHat/CentOS/Fedora (aarch64) | Download wazuh-server package] ***
skipping: [aio]

TASK [wazuh-server : RedHat/CentOS/Fedora | Install wazuh-server package] ******
changed: [aio]

TASK [wazuh-server : Debian-based (AMD64) | Download wazuh-server package] *****
skipping: [aio]

TASK [wazuh-server : Debian-based (ARM64) | Download wazuh-server package] *****
skipping: [aio]

TASK [wazuh-server : Debian-based | Install wazuh-server package] **************
skipping: [aio]

TASK [wazuh-server : Copy the certificates from local to the Wazuh Server instance] ***
changed: [aio] => (item=root-ca.pem)
changed: [aio] => (item=wazuh-1-key.pem)
changed: [aio] => (item=wazuh-1.pem)

TASK [wazuh-server : Rename certificates to match default names] ***************
changed: [aio] => (item={'src': 'wazuh-1-key.pem', 'dest': 'server-key.pem'})
changed: [aio] => (item={'src': 'wazuh-1.pem', 'dest': 'server.pem'})

TASK [wazuh-server : Generate the wazuh-keystore (username)] *******************
changed: [aio]

TASK [wazuh-server : Generate the wazuh-keystore (password)] *******************
changed: [aio]

TASK [wazuh-server : Server-config | Edit the indexer.hosts configuration] *****
changed: [aio]

TASK [wazuh-server : Server-config | Edit the communications_api.host configuration] ***
changed: [aio]

TASK [wazuh-server : Server-config | Edit the management_api.host configuration] ***
changed: [aio]

TASK [wazuh-server : Server-config | Remove empty lines] ***********************
changed: [aio]

TASK [wazuh-server : Ensure Wazuh Server service is started and enabled.] ******
changed: [aio]

TASK [wazuh-server : Remove leftover installation files] ***********************
changed: [aio]

TASK [wazuh-dashboard : include_vars] ******************************************
ok: [aio]

TASK [wazuh-dashboard : include_vars] ******************************************
ok: [aio]

TASK [wazuh-dashboard : Retrieve local_configs_path directory information] *****
ok: [aio -> localhost]

TASK [wazuh-dashboard : fail] **************************************************
skipping: [aio]

TASK [wazuh-dashboard : Ensure wazuh-dashboard package download directory exists] ***
changed: [aio]

TASK [wazuh-dashboard : RedHat/CentOS/Fedora | Install Dashboard dependencies] ***
ok: [aio]

TASK [wazuh-dashboard : RedHat/CentOS/Fedora (x86_64) | Download wazuh-dashboard package] ***
changed: [aio]

TASK [wazuh-dashboard : RedHat/CentOS/Fedora (aarch64) | Download wazuh-dashboard package] ***
skipping: [aio]

TASK [wazuh-dashboard : Debian-based | Install Dashboard dependencies] *********
skipping: [aio]

TASK [wazuh-dashboard : Debian-based (AMD64) | Download wazuh-dashboard package] ***
skipping: [aio]

TASK [wazuh-dashboard : Debian-based (ARM64) | Download wazuh-dashboard package] ***
skipping: [aio]

TASK [wazuh-dashboard : Linux CentOS/RedHat | Install wazuh-dashboard using yum] ***
changed: [aio]

TASK [wazuh-dashboard : Linux Debian | Install wazuh-dashboard using APT] ******
skipping: [aio]

TASK [wazuh-dashboard : Dashboard-config | Remove current opensearch.hosts configuration] ***
changed: [aio]

TASK [wazuh-dashboard : Dashboard-config | Add opensearch.hosts configuration] ***
changed: [aio]

TASK [wazuh-dashboard : Dashboard-config | Update Wazuh API URL] ***************
ok: [aio]

TASK [wazuh-dashboard : Dashboard-config | Remove comments from configuration file] ***
changed: [aio]

TASK [wazuh-dashboard : Dashboard-config | Remove empty lines from config.yml file] ***
changed: [aio]

TASK [wazuh-dashboard : Copy the certificates from local to the Wazuh dashboard instance] ***
changed: [aio] => (item=root-ca.pem)
changed: [aio] => (item=dashboard-key.pem)
changed: [aio] => (item=dashboard.pem)

TASK [wazuh-dashboard : Rename certificates to match default names] ************
skipping: [aio] => (item={'src': 'dashboard.pem', 'dest': 'dashboard.pem'})
skipping: [aio] => (item={'src': 'dashboard-key.pem', 'dest': 'dashboard-key.pem'})
skipping: [aio]

TASK [wazuh-dashboard : Ensure Wazuh dashboard started and enabled] ************
changed: [aio]

TASK [wazuh-dashboard : Extract server host from dashboard configuration] ******
ok: [aio]

TASK [wazuh-dashboard : Extract server port from dashboard configuration] ******
ok: [aio]

TASK [wazuh-dashboard : Wait for Wazuh dashboard to be ready] ******************
FAILED - RETRYING: [aio]: Wait for Wazuh dashboard to be ready (10 retries left).
FAILED - RETRYING: [aio]: Wait for Wazuh dashboard to be ready (9 retries left).
ok: [aio]

TASK [wazuh-dashboard : Remove installation leftovers] *************************
changed: [aio]

PLAY RECAP *********************************************************************
aio                        : ok=67   changed=47   unreachable=0    failed=0    skipped=55   rescued=0    ignored=0

Distributed

Accessing dashboard

Below is a screenshot of the Discovery -> Agents dashboard section. Here, you can see the logs of a successfully enrolled agent, demonstrating the proper functionality of the Wazuh (distributed) cluster deployed using Ansible (including the Nginx load balancer).

Image

Ansible execution output

Below is a complete log of the execution results for the Ansible deployment of AIO.

Expand
PLAY [wi_cluster] **************************************************************

TASK [Gathering Facts] *********************************************************
ok: [wi1]
ok: [wi2]
ok: [wi3]

TASK [wazuh-indexer : include_vars] ********************************************
ok: [wi1]
ok: [wi2]
ok: [wi3]

TASK [wazuh-indexer : include_vars] ********************************************
ok: [wi1]
ok: [wi2]
ok: [wi3]

TASK [wazuh-indexer : RHEL-based | Remove wazuh central components] ************
skipping: [wi1]
skipping: [wi2]
skipping: [wi3]

TASK [wazuh-indexer : Debian-based | Remove wazuh central components] **********
skipping: [wi1]
skipping: [wi2]
skipping: [wi3]

TASK [wazuh-indexer : Remove package download directory, and other dirs] *******
skipping: [wi1]
skipping: [wi2]
skipping: [wi3]

TASK [wazuh-indexer : RHEL-based LB | Uninstall nginx] *************************
skipping: [wi1]
skipping: [wi2]
skipping: [wi3]

TASK [wazuh-indexer : Debian-based LB | Uninstall nginx] ***********************
skipping: [wi1]
skipping: [wi2]
skipping: [wi3]

TASK [wazuh-indexer : RHEL-based LB | Uninstall Nginx using shell] *************
skipping: [wi1]
skipping: [wi2]
skipping: [wi3]

TASK [wazuh-indexer : Debian-based LB | Purge Nginx using shell] ***************
skipping: [wi1]
skipping: [wi2]
skipping: [wi3]

TASK [wazuh-indexer : RHEL-based LB | Remove Nginx directories] ****************
skipping: [wi1]
skipping: [wi2]
skipping: [wi3]

TASK [wazuh-indexer : Ensure wazuh-indexer package download directory exists] ***
changed: [wi1]
changed: [wi2]
changed: [wi3]

TASK [wazuh-indexer : Amazon Linux | Install Amazon extras in Amazon Linux 2] ***
skipping: [wi1]
skipping: [wi2]
skipping: [wi3]

TASK [wazuh-indexer : Amazon Linux | Configure vm.max_map_count] ***************
skipping: [wi1]
skipping: [wi2]
skipping: [wi3]

TASK [wazuh-indexer : Amazon Linux | Update vm.max_map_count] ******************
skipping: [wi1]
skipping: [wi2]
skipping: [wi3]

TASK [wazuh-indexer : RedHat/CentOS/Fedora | Install Indexer dependencies] *****
skipping: [wi3]
ok: [wi1]
ok: [wi2]

TASK [wazuh-indexer : RedHat/CentOS/Fedora (x86_64) | Download wazuh-indexer package] ***
skipping: [wi3]
changed: [wi1]
changed: [wi2]

TASK [wazuh-indexer : RedHat/CentOS/Fedora (aarch64) | Download wazuh-indexer package] ***
skipping: [wi1]
skipping: [wi2]
skipping: [wi3]

TASK [wazuh-indexer : Debian-based | Install Indexer dependencies] *************
skipping: [wi1]
skipping: [wi2]
ok: [wi3]

TASK [wazuh-indexer : Debian-based (AMD64) | Download wazuh-indexer package] ***
skipping: [wi1]
skipping: [wi2]
changed: [wi3]

TASK [wazuh-indexer : Debian-based (ARM64) | Download wazuh-indexer package] ***
skipping: [wi1]
skipping: [wi2]
skipping: [wi3]

TASK [wazuh-indexer : Linux CentOS/RedHat | Install wazuh-indexer using yum] ***
skipping: [wi3]
changed: [wi1]
changed: [wi2]

TASK [wazuh-indexer : Linux Debian | Install wazuh-indexer using apt] **********
skipping: [wi1]
skipping: [wi2]
changed: [wi3]

TASK [wazuh-indexer : Cert-gen | Check if certificates already exists] *********
ok: [wi1 -> localhost]

TASK [wazuh-indexer : Cert-gen | Remove existing certificates] *****************
changed: [wi1 -> localhost]

TASK [wazuh-indexer : Cert-gen | Check if configuration is defined correctly] ***
skipping: [wi1]

TASK [wazuh-indexer : Cert-gen | Create local temporary directory for certificates generation (all certs)] ***
changed: [wi1 -> localhost]

TASK [wazuh-indexer : Cert-gen | Download certificates generation tool] ********
changed: [wi1 -> localhost]

TASK [wazuh-indexer : Cert-gen | Download base config.yml file] ****************
changed: [wi1 -> localhost]

TASK [wazuh-indexer : Cert-gen | Remove comments from config.yml file] *********
changed: [wi1 -> localhost]

TASK [wazuh-indexer : Cert-gen | Remove existing nodes sections (cluster mode)] ***
changed: [wi1 -> localhost]

TASK [wazuh-indexer : Cert-gen | Add indexer nodes section (cluster mode)] *****
changed: [wi1 -> localhost]

TASK [wazuh-indexer : Cert-gen | Add server nodes section (cluster mode)] ******
changed: [wi1 -> localhost]

TASK [wazuh-indexer : Cert-gen | Add dashboard nodes section (cluster mode)] ***
changed: [wi1 -> localhost]

TASK [wazuh-indexer : Cert-gen | Remove comments from config.yml file] *********
changed: [wi1 -> localhost]

TASK [wazuh-indexer : Cert-gen | Add indexer node section (single node mode)] ***
skipping: [wi1]

TASK [wazuh-indexer : Cert-gen | Add server node section (single node mode)] ***
skipping: [wi1]

TASK [wazuh-indexer : Cert-gen | Add dashboard node section (single node mode)] ***
skipping: [wi1]

TASK [wazuh-indexer : Cert-gen | Remove empty lines from config.yml file] ******
changed: [wi1 -> localhost]

TASK [wazuh-indexer : Cert-gen | Generate certificates] ************************
changed: [wi1 -> localhost]

TASK [wazuh-indexer : Cert-gen | Copy certificates to each Wazuh indexer node] ***
changed: [wi1] => (item=root-ca.pem)
changed: [wi2] => (item=root-ca.pem)
changed: [wi3] => (item=root-ca.pem)
changed: [wi1] => (item=root-ca.key)
changed: [wi2] => (item=root-ca.key)
changed: [wi3] => (item=root-ca.key)
changed: [wi1] => (item=node-1-key.pem)
changed: [wi2] => (item=node-2-key.pem)
changed: [wi3] => (item=node-3-key.pem)
changed: [wi1] => (item=node-1.pem)
changed: [wi2] => (item=node-2.pem)
changed: [wi3] => (item=node-3.pem)
changed: [wi1] => (item=admin-key.pem)
changed: [wi2] => (item=admin-key.pem)
changed: [wi3] => (item=admin-key.pem)
changed: [wi1] => (item=admin.pem)
changed: [wi2] => (item=admin.pem)
changed: [wi3] => (item=admin.pem)

TASK [wazuh-indexer : Cert-gen | Rename indexer key certificate (1/2)] *********
changed: [wi1]
changed: [wi3]
changed: [wi2]

TASK [wazuh-indexer : Cert-gen | Rename indexer certificate (2/2)] *************
changed: [wi1]
changed: [wi2]
changed: [wi3]

TASK [wazuh-indexer : OpenSearch Config | Update network.host configuration] ***
changed: [wi1]
changed: [wi2]
changed: [wi3]

TASK [wazuh-indexer : OpenSearch Config | Update node.name configuration] ******
ok: [wi1]
changed: [wi2]
changed: [wi3]

TASK [wazuh-indexer : Remove existing nodes in cluster.initial_master_nodes] ***
changed: [wi1]
changed: [wi2]
changed: [wi3]

TASK [wazuh-indexer : OpenSearch Config | Update cluster.initial_master_nodes values] ***
changed: [wi1]
changed: [wi2]
changed: [wi3]

TASK [wazuh-indexer : OpenSearch Config | Remove cluster.initial_master_nodes for single-node cluster] ***
skipping: [wi1]
skipping: [wi2]
skipping: [wi3]

TASK [wazuh-indexer : OpenSearch Config | Uncomment discovery.seed_hosts line] ***
changed: [wi1]
changed: [wi2]
changed: [wi3]

TASK [wazuh-indexer : OpenSearch Config | Update discovery.seed_hosts value] ***
changed: [wi1]
changed: [wi3]
changed: [wi2]

TASK [wazuh-indexer : OpenSearch Config | Remove existing SSL configuration lines in plugins.security.nodes_dn] ***
changed: [wi1]
changed: [wi2]
changed: [wi3]

TASK [wazuh-indexer : OpenSearch Config | Update SSL configuration values in plugins.security.nodes_dn] ***
changed: [wi1]
changed: [wi3]
changed: [wi2]

TASK [wazuh-indexer : Add single-node discovery type if needed] ****************
skipping: [wi1]
skipping: [wi2]
skipping: [wi3]

TASK [wazuh-indexer : Reload systemd configuration] ****************************
ok: [wi1]
ok: [wi2]
ok: [wi3]

TASK [wazuh-indexer : Ensure Wazuh indexer started and enabled] ****************
changed: [wi2]
changed: [wi3]
changed: [wi1]

TASK [wazuh-indexer : Initialize Wazuh Indexer cluster] ************************
changed: [wi1]

TASK [wazuh-indexer : Wait for Wazuh indexer API] ******************************
FAILED - RETRYING: [wi1]: Wait for Wazuh indexer API (24 retries left).
FAILED - RETRYING: [wi2]: Wait for Wazuh indexer API (24 retries left).
FAILED - RETRYING: [wi3]: Wait for Wazuh indexer API (24 retries left).
ok: [wi1]
ok: [wi3]
ok: [wi2]

TASK [wazuh-indexer : Reload systemd configuration] ****************************
ok: [wi1]
ok: [wi2]
ok: [wi3]

TASK [wazuh-indexer : Remove Wazuh Indexer installation leftovers] *************
changed: [wi1]
changed: [wi2]
changed: [wi3]

PLAY [manager] *****************************************************************

TASK [Gathering Facts] *********************************************************
ok: [manager]

TASK [wazuh-server : include_vars] *********************************************
ok: [manager]

TASK [wazuh-server : include_vars] *********************************************
ok: [manager]

TASK [wazuh-server : Install Nginx] ********************************************
skipping: [manager]

TASK [wazuh-server : RHEL-based LB | Install Nginx stream module] **************
skipping: [manager]

TASK [wazuh-server : Install nginx-full package] *******************************
skipping: [manager]

TASK [wazuh-server : Make sure the /etc/nginx/modules directory exists] ********
skipping: [manager]

TASK [wazuh-server : Create symbolic link for ngx_stream_module.so [path1]] ****
skipping: [manager]

TASK [wazuh-server : Create symbolic link for ngx_stream_module.so [path2]] ****
skipping: [manager]

TASK [wazuh-server : Create symbolic link for ngx_stream_module.so [path3]] ****
skipping: [manager]

TASK [wazuh-server : Fail if Nginx stream module is not found] *****************
skipping: [manager]

TASK [wazuh-server : Start and enable Nginx service] ***************************
skipping: [manager]

TASK [wazuh-server : Gather available local users] *****************************
skipping: [manager]

TASK [wazuh-server : Set value for fact 'lb_user_group' (for 'nginx' user)] ****
skipping: [manager]

TASK [wazuh-server : Set value for fact 'lb_user_group' (for 'www-data' user)] ***
skipping: [manager]

TASK [wazuh-server : Make sure the /etc/nginx/ssl directory exists] ************
skipping: [manager]

TASK [wazuh-server : Generate self-signed SSL certificate] *********************
skipping: [manager]

TASK [wazuh-server : Rename the default Nginx configuration file] **************
skipping: [manager]

TASK [wazuh-server : Copy the Nginx configuration file] ************************
skipping: [manager]

TASK [wazuh-server : Restart Nginx service] ************************************
skipping: [manager]

TASK [wazuh-server : Retrieve local_configs_path directory information] ********
ok: [manager -> localhost]

TASK [wazuh-server : fail] *****************************************************
skipping: [manager]

TASK [wazuh-server : Ensure wazuh-server package download directory exists] ****
changed: [manager]

TASK [wazuh-server : RedHat/CentOS/Fedora (x86_64) | Download wazuh-server package] ***
changed: [manager]

TASK [wazuh-server : RedHat/CentOS/Fedora (aarch64) | Download wazuh-server package] ***
skipping: [manager]

TASK [wazuh-server : RedHat/CentOS/Fedora | Install wazuh-server package] ******
changed: [manager]

TASK [wazuh-server : Debian-based (AMD64) | Download wazuh-server package] *****
skipping: [manager]

TASK [wazuh-server : Debian-based (ARM64) | Download wazuh-server package] *****
skipping: [manager]

TASK [wazuh-server : Debian-based | Install wazuh-server package] **************
skipping: [manager]

TASK [wazuh-server : Copy the certificates from local to the Wazuh Server instance] ***
changed: [manager] => (item=root-ca.pem)
changed: [manager] => (item=node-4-key.pem)
changed: [manager] => (item=node-4.pem)

TASK [wazuh-server : Rename certificates to match default names] ***************
changed: [manager] => (item={'src': 'node-4-key.pem', 'dest': 'server-key.pem'})
changed: [manager] => (item={'src': 'node-4.pem', 'dest': 'server.pem'})

TASK [wazuh-server : Generate the wazuh-keystore (username)] *******************
changed: [manager]

TASK [wazuh-server : Generate the wazuh-keystore (password)] *******************
changed: [manager]

TASK [wazuh-server : Server-config | Edit the indexer.hosts configuration] *****
changed: [manager]

TASK [wazuh-server : Server-config | Edit the communications_api.host configuration] ***
changed: [manager]

TASK [wazuh-server : Server-config | Edit the management_api.host configuration] ***
changed: [manager]

TASK [wazuh-server : Server-config | Remove empty lines] ***********************
changed: [manager]

TASK [wazuh-server : Ensure Wazuh Server service is started and enabled.] ******
changed: [manager]

TASK [wazuh-server : Remove leftover installation files] ***********************
changed: [manager]

PLAY [worker] ******************************************************************

TASK [Gathering Facts] *********************************************************
ok: [worker]

TASK [wazuh-server : include_vars] *********************************************
ok: [worker]

TASK [wazuh-server : include_vars] *********************************************
ok: [worker]

TASK [wazuh-server : Install Nginx] ********************************************
skipping: [worker]

TASK [wazuh-server : RHEL-based LB | Install Nginx stream module] **************
skipping: [worker]

TASK [wazuh-server : Install nginx-full package] *******************************
skipping: [worker]

TASK [wazuh-server : Make sure the /etc/nginx/modules directory exists] ********
skipping: [worker]

TASK [wazuh-server : Create symbolic link for ngx_stream_module.so [path1]] ****
skipping: [worker]

TASK [wazuh-server : Create symbolic link for ngx_stream_module.so [path2]] ****
skipping: [worker]

TASK [wazuh-server : Create symbolic link for ngx_stream_module.so [path3]] ****
skipping: [worker]

TASK [wazuh-server : Fail if Nginx stream module is not found] *****************
skipping: [worker]

TASK [wazuh-server : Start and enable Nginx service] ***************************
skipping: [worker]

TASK [wazuh-server : Gather available local users] *****************************
skipping: [worker]

TASK [wazuh-server : Set value for fact 'lb_user_group' (for 'nginx' user)] ****
skipping: [worker]

TASK [wazuh-server : Set value for fact 'lb_user_group' (for 'www-data' user)] ***
skipping: [worker]

TASK [wazuh-server : Make sure the /etc/nginx/ssl directory exists] ************
skipping: [worker]

TASK [wazuh-server : Generate self-signed SSL certificate] *********************
skipping: [worker]

TASK [wazuh-server : Rename the default Nginx configuration file] **************
skipping: [worker]

TASK [wazuh-server : Copy the Nginx configuration file] ************************
skipping: [worker]

TASK [wazuh-server : Restart Nginx service] ************************************
skipping: [worker]

TASK [wazuh-server : Retrieve local_configs_path directory information] ********
ok: [worker -> localhost]

TASK [wazuh-server : fail] *****************************************************
skipping: [worker]

TASK [wazuh-server : Ensure wazuh-server package download directory exists] ****
changed: [worker]

TASK [wazuh-server : RedHat/CentOS/Fedora (x86_64) | Download wazuh-server package] ***
skipping: [worker]

TASK [wazuh-server : RedHat/CentOS/Fedora (aarch64) | Download wazuh-server package] ***
skipping: [worker]

TASK [wazuh-server : RedHat/CentOS/Fedora | Install wazuh-server package] ******
skipping: [worker]

TASK [wazuh-server : Debian-based (AMD64) | Download wazuh-server package] *****
changed: [worker]

TASK [wazuh-server : Debian-based (ARM64) | Download wazuh-server package] *****
skipping: [worker]

TASK [wazuh-server : Debian-based | Install wazuh-server package] **************
changed: [worker]

TASK [wazuh-server : Copy the certificates from local to the Wazuh Server instance] ***
changed: [worker] => (item=root-ca.pem)
changed: [worker] => (item=node-5-key.pem)
changed: [worker] => (item=node-5.pem)

TASK [wazuh-server : Rename certificates to match default names] ***************
changed: [worker] => (item={'src': 'node-5-key.pem', 'dest': 'server-key.pem'})
changed: [worker] => (item={'src': 'node-5.pem', 'dest': 'server.pem'})

TASK [wazuh-server : Generate the wazuh-keystore (username)] *******************
changed: [worker]

TASK [wazuh-server : Generate the wazuh-keystore (password)] *******************
changed: [worker]

TASK [wazuh-server : Server-config | Edit the indexer.hosts configuration] *****
changed: [worker]

TASK [wazuh-server : Server-config | Edit the communications_api.host configuration] ***
changed: [worker]

TASK [wazuh-server : Server-config | Edit the management_api.host configuration] ***
changed: [worker]

TASK [wazuh-server : Server-config | Remove empty lines] ***********************
changed: [worker]

TASK [wazuh-server : Ensure Wazuh Server service is started and enabled.] ******
changed: [worker]

TASK [wazuh-server : Remove leftover installation files] ***********************
changed: [worker]

PLAY [balancer] ****************************************************************

TASK [Gathering Facts] *********************************************************
ok: [balancer]

TASK [wazuh-server : include_vars] *********************************************
ok: [balancer]

TASK [wazuh-server : include_vars] *********************************************
ok: [balancer]

TASK [wazuh-server : Install Nginx] ********************************************
changed: [balancer]

TASK [wazuh-server : RHEL-based LB | Install Nginx stream module] **************
changed: [balancer]

TASK [wazuh-server : Install nginx-full package] *******************************
skipping: [balancer]

TASK [wazuh-server : Make sure the /etc/nginx/modules directory exists] ********
changed: [balancer]

TASK [wazuh-server : Create symbolic link for ngx_stream_module.so [path1]] ****
fatal: [balancer]: FAILED! => {"changed": false, "msg": "src file does not exist, use \"force=yes\" if you really want to create the link: /usr/share/nginx/modules/ngx_stream_module.so", "path": "/etc/nginx/modules/ngx_stream_module.so", "src": "/usr/share/nginx/modules/ngx_stream_module.so"}
...ignoring

TASK [wazuh-server : Create symbolic link for ngx_stream_module.so [path2]] ****
fatal: [balancer]: FAILED! => {"changed": false, "msg": "src file does not exist, use \"force=yes\" if you really want to create the link: /usr/lib/nginx/modules/ngx_stream_module.so", "path": "/etc/nginx/modules/ngx_stream_module.so", "src": "/usr/lib/nginx/modules/ngx_stream_module.so"}
...ignoring

TASK [wazuh-server : Create symbolic link for ngx_stream_module.so [path3]] ****
changed: [balancer]

TASK [wazuh-server : Fail if Nginx stream module is not found] *****************
skipping: [balancer]

TASK [wazuh-server : Start and enable Nginx service] ***************************
changed: [balancer]

TASK [wazuh-server : Gather available local users] *****************************
ok: [balancer]

TASK [wazuh-server : Set value for fact 'lb_user_group' (for 'nginx' user)] ****
ok: [balancer]

TASK [wazuh-server : Set value for fact 'lb_user_group' (for 'www-data' user)] ***
skipping: [balancer]

TASK [wazuh-server : Make sure the /etc/nginx/ssl directory exists] ************
changed: [balancer]

TASK [wazuh-server : Generate self-signed SSL certificate] *********************
changed: [balancer]

TASK [wazuh-server : Rename the default Nginx configuration file] **************
changed: [balancer]

TASK [wazuh-server : Copy the Nginx configuration file] ************************
changed: [balancer]

TASK [wazuh-server : Restart Nginx service] ************************************
changed: [balancer]

TASK [wazuh-server : Retrieve local_configs_path directory information] ********
skipping: [balancer]

TASK [wazuh-server : fail] *****************************************************
skipping: [balancer]

TASK [wazuh-server : Ensure wazuh-server package download directory exists] ****
skipping: [balancer]

TASK [wazuh-server : RedHat/CentOS/Fedora (x86_64) | Download wazuh-server package] ***
skipping: [balancer]

TASK [wazuh-server : RedHat/CentOS/Fedora (aarch64) | Download wazuh-server package] ***
skipping: [balancer]

TASK [wazuh-server : RedHat/CentOS/Fedora | Install wazuh-server package] ******
skipping: [balancer]

TASK [wazuh-server : Debian-based (AMD64) | Download wazuh-server package] *****
skipping: [balancer]

TASK [wazuh-server : Debian-based (ARM64) | Download wazuh-server package] *****
skipping: [balancer]

TASK [wazuh-server : Debian-based | Install wazuh-server package] **************
skipping: [balancer]

TASK [wazuh-server : Copy the certificates from local to the Wazuh Server instance] ***
skipping: [balancer] => (item=root-ca.pem) 
skipping: [balancer] => (item=wazuh-1-key.pem) 
skipping: [balancer] => (item=wazuh-1.pem) 
skipping: [balancer]

TASK [wazuh-server : Rename certificates to match default names] ***************
skipping: [balancer] => (item={'src': 'wazuh-1-key.pem', 'dest': 'server-key.pem'}) 
skipping: [balancer] => (item={'src': 'wazuh-1.pem', 'dest': 'server.pem'}) 
skipping: [balancer]

TASK [wazuh-server : Generate the wazuh-keystore (username)] *******************
skipping: [balancer]

TASK [wazuh-server : Generate the wazuh-keystore (password)] *******************
skipping: [balancer]

TASK [wazuh-server : Server-config | Edit the indexer.hosts configuration] *****
skipping: [balancer]

TASK [wazuh-server : Server-config | Edit the communications_api.host configuration] ***
skipping: [balancer]

TASK [wazuh-server : Server-config | Edit the management_api.host configuration] ***
skipping: [balancer]

TASK [wazuh-server : Server-config | Remove empty lines] ***********************
skipping: [balancer]

TASK [wazuh-server : Ensure Wazuh Server service is started and enabled.] ******
skipping: [balancer]

TASK [wazuh-server : Remove leftover installation files] ***********************
skipping: [balancer]

PLAY [dashboard] ***************************************************************

TASK [Gathering Facts] *********************************************************
ok: [dashboard]

TASK [wazuh-dashboard : include_vars] ******************************************
ok: [dashboard]

TASK [wazuh-dashboard : include_vars] ******************************************
ok: [dashboard]

TASK [wazuh-dashboard : Retrieve local_configs_path directory information] *****
ok: [dashboard -> localhost]

TASK [wazuh-dashboard : fail] **************************************************
skipping: [dashboard]

TASK [wazuh-dashboard : Ensure wazuh-dashboard package download directory exists] ***
changed: [dashboard]

TASK [wazuh-dashboard : RedHat/CentOS/Fedora | Install Dashboard dependencies] ***
ok: [dashboard]

TASK [wazuh-dashboard : RedHat/CentOS/Fedora (x86_64) | Download wazuh-dashboard package] ***
changed: [dashboard]

TASK [wazuh-dashboard : RedHat/CentOS/Fedora (aarch64) | Download wazuh-dashboard package] ***
skipping: [dashboard]

TASK [wazuh-dashboard : Debian-based | Install Dashboard dependencies] *********
skipping: [dashboard]

TASK [wazuh-dashboard : Debian-based (AMD64) | Download wazuh-dashboard package] ***
skipping: [dashboard]

TASK [wazuh-dashboard : Debian-based (ARM64) | Download wazuh-dashboard package] ***
skipping: [dashboard]

TASK [wazuh-dashboard : Linux CentOS/RedHat | Install wazuh-dashboard using yum] ***
changed: [dashboard]

TASK [wazuh-dashboard : Linux Debian | Install wazuh-dashboard using APT] ******
skipping: [dashboard]

TASK [wazuh-dashboard : Dashboard-config | Remove current opensearch.hosts configuration] ***
changed: [dashboard]

TASK [wazuh-dashboard : Dashboard-config | Add opensearch.hosts configuration] ***
changed: [dashboard]

TASK [wazuh-dashboard : Dashboard-config | Update Wazuh API URL] ***************
changed: [dashboard]

TASK [wazuh-dashboard : Dashboard-config | Remove comments from configuration file] ***
changed: [dashboard]

TASK [wazuh-dashboard : Dashboard-config | Remove empty lines from config.yml file] ***
changed: [dashboard]

TASK [wazuh-dashboard : Copy the certificates from local to the Wazuh dashboard instance] ***
changed: [dashboard] => (item=root-ca.pem)
changed: [dashboard] => (item=node-6-key.pem)
changed: [dashboard] => (item=node-6.pem)

TASK [wazuh-dashboard : Rename certificates to match default names] ************
changed: [dashboard] => (item={'src': 'node-6.pem', 'dest': 'dashboard.pem'})
changed: [dashboard] => (item={'src': 'node-6-key.pem', 'dest': 'dashboard-key.pem'})

TASK [wazuh-dashboard : Ensure Wazuh dashboard started and enabled] ************
changed: [dashboard]

TASK [wazuh-dashboard : Extract server host from dashboard configuration] ******
ok: [dashboard]

TASK [wazuh-dashboard : Extract server port from dashboard configuration] ******
ok: [dashboard]

TASK [wazuh-dashboard : Wait for Wazuh dashboard to be ready] ******************
ok: [dashboard]

TASK [wazuh-dashboard : Remove installation leftovers] *************************
changed: [dashboard]

PLAY RECAP *********************************************************************
balancer                   : ok=17   changed=10   unreachable=0    failed=0    skipped=22   rescued=0    ignored=2   
dashboard                  : ok=20   changed=12   unreachable=0    failed=0    skipped=6    rescued=0    ignored=0   
manager                    : ok=17   changed=13   unreachable=0    failed=0    skipped=22   rescued=0    ignored=0   
wi1                        : ok=37   changed=28   unreachable=0    failed=0    skipped=22   rescued=0    ignored=0   
wi2                        : ok=23   changed=16   unreachable=0    failed=0    skipped=18   rescued=0    ignored=0   
wi3                        : ok=23   changed=16   unreachable=0    failed=0    skipped=18   rescued=0    ignored=0   
worker                     : ok=17   changed=13   unreachable=0    failed=0    skipped=22   rescued=0    ignored=0   

@YisDav YisDav linked a pull request Mar 12, 2025 that will close this issue
@wazuhci wazuhci moved this from In progress to Pending review in XDR+SIEM/Release 5.0.0 Mar 12, 2025
@wazuhci wazuhci moved this from Pending review to Done in XDR+SIEM/Release 5.0.0 Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants