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 - Creation of the roles: wazuh-indexer, wazuh-manager, wazuh-dashboard, and wazuh-agent #1493

Closed
1 task
YisDav opened this issue Dec 20, 2024 · 3 comments · Fixed by #1594, #1597, #1598, #1601 or #1599
Assignees

Comments

@YisDav
Copy link
Member

YisDav commented Dec 20, 2024

Description

The objective of this task is to create Ansible roles for the Wazuh components: wazuh-indexer, wazuh-manager, wazuh-dashboard, and wazuh-agent. Each role will encapsulate the installation and configuration processes necessary for deploying these components effectively. The roles will ensure modularity, reusability, and maintainability of the Ansible codebase.

Considerations

  • Role Structure: Each role should follow the standard Ansible role structure, including tasks, handlers, variables, and defaults.
  • Package Management: The roles must support installation via common package managers (apt for Debian-based systems and yum for Red Hat-based systems), but using directly downloaded packages (previously saved in a defined directory for such purpose and with a fixed filename).
  • Idempotency: Ensure that the roles are idempotent, meaning running the same playbook multiple times will not produce unintended side effects.
  • Configuration Files: Each role should manage its configuration files and ensure they are properly templated to adapt to different environments (development, staging, production) deployments.
  • Error Handling: Implement error handling and logging to capture any issues during the installation and configuration processes.

Involved Steps

  1. Role Directory Setup

    • Create directories for each role under roles/:
      mkdir -p roles/wazuh-indexer/tasks
      mkdir -p roles/wazuh-manager/tasks
      mkdir -p roles/wazuh-dashboard/tasks
      mkdir -p roles/wazuh-agent/tasks
  2. Define Tasks for Each Role

    • wazuh-indexer:
      • Install the Wazuh indexer package.
      • Configure the indexer settings.
      • Start and enable the indexer service.
    • wazuh-manager:
      • Install the Wazuh manager package.
      • Configure the manager settings.
      • Start and enable the manager service.
    • wazuh-dashboard:
      • Install the Wazuh dashboard package.
      • Configure the dashboard settings.
      • Start and enable the dashboard service.
    • wazuh-agent:
      • Install the Wazuh agent package.
      • Configure the agent to communicate with the Wazuh manager.
      • Start and enable the agent service.
  3. Create Handlers

    • Define handlers for restarting services when configuration files change.
    • Example for wazuh-indexer:
      handlers:
        - name: restart wazuh-indexer
          service:
            name: wazuh-indexer
            state: restarted
  4. Manage Variables

    • Create defaults/main.yml for each role to define the default values for the role-specific variables such as configuration paths, and service names.
  5. Testing and Validation

    • Create a playbook to test the roles individually and ensure they perform as expected.
    • Validate that each component is installed and configured correctly by checking service statuses and configuration files.
  6. Documentation

    • Document each role, including its purpose, variables used, and any dependencies required.

Additional tasks

  • Test the deployment (AIO and Distributed)
@YisDav
Copy link
Member Author

YisDav commented Jan 15, 2025

DRI

@teddytpc1

@wazuhci wazuhci moved this to On hold in XDR+SIEM/Release 5.0.0 Jan 22, 2025
@wazuhci wazuhci moved this from On hold to In progress in XDR+SIEM/Release 5.0.0 Jan 22, 2025
@teddytpc1 teddytpc1 changed the title Ansible MVP - Creation of the roles: wazuh-indexer, wazuh-manager, wazuh-dashboard, and wazuh-agent MVP - Ansible - Creation of the roles: wazuh-indexer, wazuh-manager, wazuh-dashboard, and wazuh-agent Jan 27, 2025
@wazuhci wazuhci moved this from In progress to On hold in XDR+SIEM/Release 5.0.0 Jan 28, 2025
@wazuhci wazuhci moved this from On hold to In progress in XDR+SIEM/Release 5.0.0 Feb 6, 2025
@wazuhci wazuhci moved this from In progress to On hold in XDR+SIEM/Release 5.0.0 Feb 11, 2025
@wazuhci wazuhci moved this from On hold to In progress in XDR+SIEM/Release 5.0.0 Feb 11, 2025
@wazuhci wazuhci moved this from In progress to On hold in XDR+SIEM/Release 5.0.0 Feb 13, 2025
@wazuhci wazuhci moved this from On hold to In progress in XDR+SIEM/Release 5.0.0 Feb 19, 2025
@wazuhci wazuhci moved this from In progress to On hold in XDR+SIEM/Release 5.0.0 Feb 20, 2025
@wazuhci wazuhci moved this from On hold to In progress in XDR+SIEM/Release 5.0.0 Feb 21, 2025
@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 In progress in XDR+SIEM/Release 5.0.0 Mar 13, 2025
@YisDav
Copy link
Member Author

YisDav commented Mar 20, 2025

Update

Complete Set Testing (Roles and Playbooks)

Below are the results and evidence from the tests conducted using the roles wazuh-indexer, wazuh-server, wazuh-dashboard, and wazuh-agent, as well as the playbooks wazuh-aio, wazuh-distributed, and wazuh-agent.

Tested Systems:

Distribution Version Architecture
Ubuntu 24.04 x86_64
Debian 12 x86_64
Red Hat 9 x86_64
CentOS Stream 9 x86_64
Amazon Linux 2 x86_64

Summary of Tests Conducted:

  • Agents were tested on all the operating systems listed above. Simultaneously, an AIO cluster was installed, with agents successfully connecting to its server module.
  • Both AIO and distributed deployment methods were tested across all mentioned operating systems.
  • Load balancer installation was validated on each of the listed systems.
  • Validation was performed in the enhancement/1493-roles-creation-improvement-changes branch (attached to this PR) for the updates planned in version 5.0.0. However, the packages have not yet incorporated these updates, which caused the test to fail.

Important

Must properly configure SELinux (if applicable) before trying to run Load Balancer Ansible actions.

Test Results:

Test Type Result
AIO
Distributed
Agent
Load Balancer
Latest 5.0.0 Changes

Evidence File:
A .zip file containing all test results and evidence is attached below.

evidence-1493.zip

🟢 AIO

Below is the provided evidence:

Ansible Output

Ansible Output: AIO deployment in Debian system
PLAY [all] *********************************************************************

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

TASK [package-urls : include_vars] *********************************************
ok: [aio]

TASK [package-urls : Download package URLs file] *******************************
skipping: [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] *****
skipping: [aio]

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

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

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

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

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

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

TASK [wazuh-indexer : Linux Debian | Install wazuh-indexer using apt] **********
changed: [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 : Linux | 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 : Amazon Linux 2 | Install Nginx] ***************************
skipping: [aio]

TASK [wazuh-server : Install Nginx (package manager)] **************************
skipping: [aio]

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

TASK [wazuh-server : RHEL-based LB | Install Nginx stream module] **************
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] ***
skipping: [aio]

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

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

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

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

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

TASK [wazuh-server : Linux | Reload systemd configuration] *********************
ok: [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] ***
skipping: [aio]

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

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

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

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

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

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

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

TASK [wazuh-dashboard : Linux | Reload systemd configuration] ******************
ok: [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] ******************
ok: [aio]

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

PLAY RECAP *********************************************************************
aio                        : ok=70   changed=47   unreachable=0    failed=0    skipped=49   rescued=0    ignored=0   

Ansible Output: AIO deployment in RHEL system
PLAY [all] *********************************************************************

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

TASK [package-urls : include_vars] *********************************************
ok: [aio]

TASK [package-urls : Download package URLs file] *******************************
skipping: [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] *****
changed: [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 : Linux | 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 : Amazon Linux 2 | Install Nginx] ***************************
skipping: [aio]

TASK [wazuh-server : Install Nginx (package manager)] **************************
skipping: [aio]

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

TASK [wazuh-server : RHEL-based LB | Install Nginx stream module] **************
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 : Linux | Reload systemd configuration] *********************
ok: [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 : Linux | Reload systemd configuration] ******************
ok: [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] ******************
ok: [aio]

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

PLAY RECAP *********************************************************************
aio                        : ok=70   changed=48   unreachable=0    failed=0    skipped=49   rescued=0    ignored=0   

🟢 Distributed

Below is the provided evidence:

Ansible Output

Ansible Output: Distributed deployment
PLAY [localhost] ***************************************************************

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

TASK [package-urls : include_vars] *********************************************
ok: [localhost]

TASK [package-urls : Download package URLs file] *******************************
skipping: [localhost]

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

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

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 : Ensure wazuh-indexer package download directory exists] ***
changed: [wi3]
changed: [wi1]
changed: [wi2]

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

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

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

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

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

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: [wi3]
ok: [wi2]
ok: [wi1]

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

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: [wi1]
skipping: [wi2]
changed: [wi3]

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

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: [wi3] => (item=root-ca.pem)
changed: [wi1] => (item=root-ca.pem)
changed: [wi2] => (item=root-ca.pem)
changed: [wi3] => (item=root-ca.key)
changed: [wi1] => (item=root-ca.key)
changed: [wi2] => (item=root-ca.key)
changed: [wi3] => (item=node-3-key.pem)
changed: [wi1] => (item=node-1-key.pem)
changed: [wi2] => (item=node-2-key.pem)
changed: [wi3] => (item=node-3.pem)
changed: [wi1] => (item=node-1.pem)
changed: [wi2] => (item=node-2.pem)
changed: [wi3] => (item=admin-key.pem)
changed: [wi1] => (item=admin-key.pem)
changed: [wi2] => (item=admin-key.pem)
changed: [wi3] => (item=admin.pem)
changed: [wi1] => (item=admin.pem)
changed: [wi2] => (item=admin.pem)

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

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

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

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

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

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

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: [wi3]
changed: [wi2]

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: [wi3]
changed: [wi2]

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 : Linux | Reload systemd configuration] ********************
ok: [wi3]
ok: [wi2]
ok: [wi1]

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

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

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

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

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

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

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

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

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

TASK [wazuh-server : Amazon Linux 2 | Install Nginx] ***************************
skipping: [manager]

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

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

TASK [wazuh-server : RHEL-based LB | Install Nginx stream module] **************
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 : Linux | Reload systemd configuration] *********************
ok: [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 : Amazon Linux 2 | Install Nginx] ***************************
skipping: [worker]

TASK [wazuh-server : Install Nginx (package manager)] **************************
skipping: [worker]

TASK [wazuh-server : Debian-based LB | Install Nginx full package] *************
skipping: [worker]

TASK [wazuh-server : RHEL-based LB | Install Nginx stream module] **************
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] ***
changed: [worker]

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

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

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

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

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

TASK [wazuh-server : Linux | Reload systemd configuration] *********************
ok: [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 : Amazon Linux 2 | Install Nginx] ***************************
changed: [balancer]

TASK [wazuh-server : Install Nginx (package manager)] **************************
skipping: [balancer]

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

TASK [wazuh-server : RHEL-based LB | Install Nginx stream module] **************
ok: [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 : Linux | Reload systemd configuration] *********************
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 : Linux | Reload systemd configuration] ******************
ok: [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=9    unreachable=0    failed=0    skipped=24   rescued=0    ignored=2   
dashboard                  : ok=21   changed=12   unreachable=0    failed=0    skipped=6    rescued=0    ignored=0   
localhost                  : ok=2    changed=0    unreachable=0    failed=0    skipped=1    rescued=0    ignored=0   
manager                    : ok=18   changed=13   unreachable=0    failed=0    skipped=23   rescued=0    ignored=0   
wi1                        : ok=37   changed=28   unreachable=0    failed=0    skipped=14   rescued=0    ignored=0   
wi2                        : ok=23   changed=16   unreachable=0    failed=0    skipped=10   rescued=0    ignored=0   
wi3                        : ok=26   changed=17   unreachable=0    failed=0    skipped=7    rescued=0    ignored=0   
worker                     : ok=18   changed=13   unreachable=0    failed=0    skipped=23   rescued=0    ignored=0   

@YisDav
Copy link
Member Author

YisDav commented Mar 20, 2025

🟢 Agents (+ AIO)

Below is the provided evidence:

Dashboard

Image

Ansible Output

Ansible Output: Agent Installation
ansible-playbook -i agent_inventory.ini  wazuh-agent.yml

PLAY [agents] *******************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************************************************************
[WARNING]: Platform linux on host agent_al2_1 is using the discovered Python interpreter at /usr/bin/python3.7, but future installation of another Python interpreter could change the meaning of that path. See
https://docs.ansible.com/ansible-core/2.16/reference_appendices/interpreter_discovery.html for more information.
ok: [agent_al2_1]
ok: [agent_centos9]
ok: [agent_debian12]
ok: [agent_ubuntu2204]
ok: [agent_rhel9]
[WARNING]: Platform linux on host agent_al2_2 is using the discovered Python interpreter at /usr/bin/python3.7, but future installation of another Python interpreter could change the meaning of that path. See
https://docs.ansible.com/ansible-core/2.16/reference_appendices/interpreter_discovery.html for more information.
ok: [agent_al2_2]

TASK [include_role : ./roles/wazuh-agent] ***************************************************************************************************************************************************************************************

TASK [./roles/wazuh-agent : include_vars] ***************************************************************************************************************************************************************************************
ok: [agent_ubuntu2204]
ok: [agent_debian12]
ok: [agent_al2_1]
ok: [agent_rhel9]
ok: [agent_centos9]
ok: [agent_al2_2]

TASK [./roles/wazuh-agent : include_vars] ***************************************************************************************************************************************************************************************
ok: [agent_ubuntu2204]
ok: [agent_debian12]
ok: [agent_al2_1]
ok: [agent_rhel9]
ok: [agent_centos9]
ok: [agent_al2_2]

TASK [./roles/wazuh-agent : include_tasks] **************************************************************************************************************************************************************************************
included: /home/yisdav/work/wazuh/wazuh/wazuh-ansible/roles/wazuh-agent/tasks/Linux.yml for agent_ubuntu2204, agent_debian12, agent_al2_1, agent_rhel9, agent_centos9, agent_al2_2

TASK [./roles/wazuh-agent : Linux | Create directory for wazuh-agent package] ***************************************************************************************************************************************************
changed: [agent_ubuntu2204]
changed: [agent_centos9]
changed: [agent_debian12]
changed: [agent_al2_1]
changed: [agent_rhel9]
changed: [agent_al2_2]

TASK [./roles/wazuh-agent : include_tasks] **************************************************************************************************************************************************************************************
skipping: [agent_ubuntu2204]
skipping: [agent_debian12]
included: /home/yisdav/work/wazuh/wazuh/wazuh-ansible/roles/wazuh-agent/tasks/RedHat.yml for agent_al2_1, agent_rhel9, agent_centos9, agent_al2_2

TASK [./roles/wazuh-agent : Linux CentOS/RedHat (x86_64) | Download wazuh-agent package] ****************************************************************************************************************************************
changed: [agent_al2_1]
changed: [agent_al2_2]
changed: [agent_rhel9]
changed: [agent_centos9]

TASK [./roles/wazuh-agent : Linux CentOS/RedHat (aarch64) | Download wazuh-agent package] ***************************************************************************************************************************************
skipping: [agent_al2_1]
skipping: [agent_rhel9]
skipping: [agent_centos9]
skipping: [agent_al2_2]

TASK [./roles/wazuh-agent : include_tasks] **************************************************************************************************************************************************************************************
skipping: [agent_al2_1]
skipping: [agent_rhel9]
skipping: [agent_centos9]
skipping: [agent_al2_2]
included: /home/yisdav/work/wazuh/wazuh/wazuh-ansible/roles/wazuh-agent/tasks/Debian.yml for agent_ubuntu2204, agent_debian12

TASK [./roles/wazuh-agent : Linux Debian (AMD64) | Download wazuh-agent package] ************************************************************************************************************************************************
changed: [agent_ubuntu2204]
changed: [agent_debian12]

TASK [./roles/wazuh-agent : Linux Debian (ARM64) | Download wazuh-agent package] ************************************************************************************************************************************************
skipping: [agent_ubuntu2204]
skipping: [agent_debian12]

TASK [./roles/wazuh-agent : Linux CentOS/RedHat | Install wazuh-agent using yum (x86_64)] ***************************************************************************************************************************************
skipping: [agent_ubuntu2204]
skipping: [agent_debian12]
changed: [agent_al2_1]
changed: [agent_al2_2]
changed: [agent_centos9]
changed: [agent_rhel9]

TASK [./roles/wazuh-agent : Linux CentOS/RedHat | Install wazuh-agent using yum (aarch64)] **************************************************************************************************************************************
skipping: [agent_ubuntu2204]
skipping: [agent_debian12]
skipping: [agent_al2_1]
skipping: [agent_rhel9]
skipping: [agent_centos9]
skipping: [agent_al2_2]

TASK [./roles/wazuh-agent : Linux Debian | Install wazuh-agent using dpkg (AMD64)] **********************************************************************************************************************************************
skipping: [agent_al2_1]
skipping: [agent_rhel9]
skipping: [agent_centos9]
skipping: [agent_al2_2]
changed: [agent_ubuntu2204]
changed: [agent_debian12]

TASK [./roles/wazuh-agent : Linux Debian | Install wazuh-agent using dpkg (ARM64)] **********************************************************************************************************************************************
skipping: [agent_ubuntu2204]
skipping: [agent_debian12]
skipping: [agent_al2_1]
skipping: [agent_rhel9]
skipping: [agent_centos9]
skipping: [agent_al2_2]

TASK [./roles/wazuh-agent : Update Wazuh agent configuration with Wazuh server IP address] **************************************************************************************************************************************
changed: [agent_centos9]
changed: [agent_debian12]
changed: [agent_ubuntu2204]
changed: [agent_al2_1]
changed: [agent_rhel9]
changed: [agent_al2_2]

TASK [./roles/wazuh-agent : Linux | Register Wazuh agent] ***********************************************************************************************************************************************************************
changed: [agent_ubuntu2204]
changed: [agent_centos9]
changed: [agent_debian12]
changed: [agent_al2_1]
changed: [agent_rhel9]
changed: [agent_al2_2]

TASK [./roles/wazuh-agent : Linux | Reload systemd configuration] ***************************************************************************************************************************************************************
ok: [agent_al2_1]
ok: [agent_centos9]
ok: [agent_debian12]
ok: [agent_ubuntu2204]
ok: [agent_rhel9]
ok: [agent_al2_2]

TASK [./roles/wazuh-agent : Linux | Ensure Wazuh Agent service is stopped [1/3]] ************************************************************************************************************************************************
ok: [agent_al2_1]
ok: [agent_debian12]
ok: [agent_ubuntu2204]
ok: [agent_centos9]
ok: [agent_rhel9]
ok: [agent_al2_2]

TASK [./roles/wazuh-agent : Linux | Ensure Wazuh Agent service is disabled [2/3]] ***********************************************************************************************************************************************
changed: [agent_al2_1]
changed: [agent_debian12]
changed: [agent_centos9]
changed: [agent_ubuntu2204]
changed: [agent_rhel9]
changed: [agent_al2_2]

TASK [./roles/wazuh-agent : Linux | Ensure Wazuh Agent service is started and enabled [3/3]] ************************************************************************************************************************************
changed: [agent_al2_1]
changed: [agent_centos9]
changed: [agent_debian12]
changed: [agent_ubuntu2204]
changed: [agent_rhel9]
changed: [agent_al2_2]

TASK [./roles/wazuh-agent : Linux | Remove leftover wazuh-agent installation directory] *****************************************************************************************************************************************
changed: [agent_debian12]
changed: [agent_ubuntu2204]
changed: [agent_centos9]
changed: [agent_al2_1]
changed: [agent_rhel9]
changed: [agent_al2_2]

TASK [./roles/wazuh-agent : include_tasks] **************************************************************************************************************************************************************************************
skipping: [agent_ubuntu2204]
skipping: [agent_debian12]
skipping: [agent_al2_1]
skipping: [agent_rhel9]
skipping: [agent_centos9]
skipping: [agent_al2_2]

TASK [./roles/wazuh-agent : include_tasks] **************************************************************************************************************************************************************************************
skipping: [agent_ubuntu2204]
skipping: [agent_debian12]
skipping: [agent_al2_1]
skipping: [agent_rhel9]
skipping: [agent_centos9]
skipping: [agent_al2_2]

TASK [Include wazuh-agent role for Windows hosts] *******************************************************************************************************************************************************************************
skipping: [agent_ubuntu2204]
skipping: [agent_debian12]
skipping: [agent_al2_1]
skipping: [agent_rhel9]
skipping: [agent_centos9]
skipping: [agent_al2_2]

PLAY RECAP **********************************************************************************************************************************************************************************************************************
agent_al2_1                : ok=15   changed=8    unreachable=0    failed=0    skipped=8    rescued=0    ignored=0   
agent_al2_2                : ok=15   changed=8    unreachable=0    failed=0    skipped=8    rescued=0    ignored=0   
agent_centos9              : ok=15   changed=8    unreachable=0    failed=0    skipped=8    rescued=0    ignored=0   
agent_debian12             : ok=15   changed=8    unreachable=0    failed=0    skipped=8    rescued=0    ignored=0   
agent_rhel9                : ok=15   changed=8    unreachable=0    failed=0    skipped=8    rescued=0    ignored=0   
agent_ubuntu2204           : ok=15   changed=8    unreachable=0    failed=0    skipped=8    rescued=0    ignored=0   

🟢 Load balancer

Below is the provided evidence:

Ansible Output

Ansible Output: Load balancer installation
PLAY [all] *********************************************************************

TASK [Gathering Facts] *********************************************************
ok: [host_al2_1]
ok: [host_al_3]
ok: [host_rhel9]
ok: [host_debian12]
ok: [host_ubuntu2204]
ok: [host_al2_2]
ok: [host_centos9]

TASK [wazuh-server : include_vars] *********************************************
ok: [host_ubuntu2204]
ok: [host_debian12]
ok: [host_al_3]
ok: [host_al2_1]
ok: [host_rhel9]
ok: [host_centos9]
ok: [host_al2_2]

TASK [wazuh-server : include_vars] *********************************************
ok: [host_ubuntu2204]
ok: [host_debian12]
ok: [host_al_3]
ok: [host_al2_1]
ok: [host_rhel9]
ok: [host_centos9]
ok: [host_al2_2]

TASK [wazuh-server : Amazon Linux 2 | Install Nginx] ***************************
skipping: [host_ubuntu2204]
skipping: [host_debian12]
skipping: [host_rhel9]
skipping: [host_centos9]
changed: [host_al2_2]
changed: [host_al_3]
changed: [host_al2_1]

TASK [wazuh-server : Install Nginx (package manager)] **************************
skipping: [host_al_3]
skipping: [host_al2_1]
skipping: [host_al2_2]
changed: [host_centos9]
changed: [host_rhel9]
changed: [host_debian12]
changed: [host_ubuntu2204]

TASK [wazuh-server : Debian-based LB | Install Nginx full package] *************
skipping: [host_al_3]
skipping: [host_al2_1]
skipping: [host_rhel9]
skipping: [host_centos9]
skipping: [host_al2_2]
changed: [host_debian12]
changed: [host_ubuntu2204]

TASK [wazuh-server : RHEL-based LB | Install Nginx stream module] **************
skipping: [host_ubuntu2204]
skipping: [host_debian12]
ok: [host_al_3]
ok: [host_al2_1]
changed: [host_centos9]
changed: [host_rhel9]
changed: [host_al2_2]

TASK [wazuh-server : Make sure the /etc/nginx/modules directory exists] ********
changed: [host_al2_1]
changed: [host_ubuntu2204]
changed: [host_al_3]
changed: [host_rhel9]
changed: [host_debian12]
changed: [host_al2_2]
changed: [host_centos9]

TASK [wazuh-server : Create symbolic link for ngx_stream_module.so [path1]] ****
changed: [host_ubuntu2204]
fatal: [host_al2_1]: 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
fatal: [host_al_3]: 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
fatal: [host_rhel9]: 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
changed: [host_debian12]
fatal: [host_al2_2]: 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
fatal: [host_centos9]: 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]] ****
skipping: [host_ubuntu2204]
skipping: [host_debian12]
fatal: [host_al2_2]: 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
fatal: [host_centos9]: 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
fatal: [host_al2_1]: 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
fatal: [host_al_3]: 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
fatal: [host_rhel9]: 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]] ****
skipping: [host_ubuntu2204]
skipping: [host_debian12]
changed: [host_al2_2]
changed: [host_al2_1]
changed: [host_al_3]
changed: [host_centos9]
changed: [host_rhel9]

TASK [wazuh-server : Fail if Nginx stream module is not found] *****************
skipping: [host_ubuntu2204]
skipping: [host_debian12]
skipping: [host_al_3]
skipping: [host_al2_1]
skipping: [host_rhel9]
skipping: [host_centos9]
skipping: [host_al2_2]

TASK [wazuh-server : Start and enable Nginx service] ***************************
changed: [host_al2_1]
changed: [host_al_3]
ok: [host_ubuntu2204]
ok: [host_debian12]
changed: [host_rhel9]
changed: [host_al2_2]
changed: [host_centos9]

TASK [wazuh-server : Gather available local users] *****************************
ok: [host_ubuntu2204]
ok: [host_al2_1]
ok: [host_al_3]
ok: [host_rhel9]
ok: [host_debian12]
ok: [host_al2_2]
ok: [host_centos9]

TASK [wazuh-server : Set value for fact 'lb_user_group' (for 'nginx' user)] ****
skipping: [host_ubuntu2204]
skipping: [host_debian12]
ok: [host_al_3]
ok: [host_al2_1]
ok: [host_rhel9]
ok: [host_centos9]
ok: [host_al2_2]

TASK [wazuh-server : Set value for fact 'lb_user_group' (for 'www-data' user)] ***
ok: [host_ubuntu2204]
ok: [host_debian12]
skipping: [host_al_3]
skipping: [host_al2_1]
skipping: [host_rhel9]
skipping: [host_centos9]
skipping: [host_al2_2]

TASK [wazuh-server : Make sure the /etc/nginx/ssl directory exists] ************
changed: [host_ubuntu2204]
changed: [host_al_3]
changed: [host_al2_1]
changed: [host_rhel9]
changed: [host_debian12]
changed: [host_al2_2]
changed: [host_centos9]

TASK [wazuh-server : Generate self-signed SSL certificate] *********************
changed: [host_al2_1]
changed: [host_al_3]
changed: [host_rhel9]
changed: [host_ubuntu2204]
changed: [host_debian12]
changed: [host_al2_2]
changed: [host_centos9]

TASK [wazuh-server : Rename the default Nginx configuration file] **************
changed: [host_ubuntu2204]
changed: [host_al_3]
changed: [host_al2_1]
changed: [host_debian12]
changed: [host_rhel9]
changed: [host_al2_2]
changed: [host_centos9]

TASK [wazuh-server : Copy the Nginx configuration file] ************************
changed: [host_al_3]
changed: [host_al2_1]
changed: [host_ubuntu2204]
changed: [host_debian12]
changed: [host_rhel9]
changed: [host_al2_2]
changed: [host_centos9]

TASK [wazuh-server : Restart Nginx service] ************************************
changed: [host_al2_1]
changed: [host_al_3]
changed: [host_ubuntu2204]
changed: [host_debian12]
changed: [host_rhel9]
changed: [host_al2_2]
changed: [host_centos9]

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

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

TASK [wazuh-server : Ensure wazuh-server package download directory exists] ****
skipping: [host_ubuntu2204]
skipping: [host_debian12]
skipping: [host_al_3]
skipping: [host_al2_1]
skipping: [host_rhel9]
skipping: [host_centos9]
skipping: [host_al2_2]

TASK [wazuh-server : RedHat/CentOS/Fedora (x86_64) | Download wazuh-server package] ***
skipping: [host_ubuntu2204]
skipping: [host_debian12]
skipping: [host_al_3]
skipping: [host_al2_1]
skipping: [host_rhel9]
skipping: [host_centos9]
skipping: [host_al2_2]

TASK [wazuh-server : RedHat/CentOS/Fedora (aarch64) | Download wazuh-server package] ***
skipping: [host_ubuntu2204]
skipping: [host_debian12]
skipping: [host_al_3]
skipping: [host_al2_1]
skipping: [host_rhel9]
skipping: [host_centos9]
skipping: [host_al2_2]

TASK [wazuh-server : RedHat/CentOS/Fedora | Install wazuh-server package] ******
skipping: [host_ubuntu2204]
skipping: [host_debian12]
skipping: [host_al_3]
skipping: [host_al2_1]
skipping: [host_rhel9]
skipping: [host_centos9]
skipping: [host_al2_2]

TASK [wazuh-server : Debian-based (AMD64) | Download wazuh-server package] *****
skipping: [host_ubuntu2204]
skipping: [host_debian12]
skipping: [host_al_3]
skipping: [host_al2_1]
skipping: [host_rhel9]
skipping: [host_centos9]
skipping: [host_al2_2]

TASK [wazuh-server : Debian-based (ARM64) | Download wazuh-server package] *****
skipping: [host_ubuntu2204]
skipping: [host_debian12]
skipping: [host_al_3]
skipping: [host_al2_1]
skipping: [host_rhel9]
skipping: [host_centos9]
skipping: [host_al2_2]

TASK [wazuh-server : Debian-based | Install wazuh-server package] **************
skipping: [host_ubuntu2204]
skipping: [host_debian12]
skipping: [host_al_3]
skipping: [host_al2_1]
skipping: [host_rhel9]
skipping: [host_centos9]
skipping: [host_al2_2]

TASK [wazuh-server : Linux | Reload systemd configuration] *********************
skipping: [host_ubuntu2204]
skipping: [host_debian12]
skipping: [host_al_3]
skipping: [host_al2_1]
skipping: [host_rhel9]
skipping: [host_centos9]
skipping: [host_al2_2]

TASK [wazuh-server : Copy the certificates from local to the Wazuh Server instance] ***
skipping: [host_ubuntu2204] => (item=root-ca.pem) 
skipping: [host_ubuntu2204] => (item=wazuh-1-key.pem) 
skipping: [host_ubuntu2204] => (item=wazuh-1.pem) 
skipping: [host_debian12] => (item=root-ca.pem) 
skipping: [host_debian12] => (item=wazuh-1-key.pem) 
skipping: [host_debian12] => (item=wazuh-1.pem) 
skipping: [host_al_3] => (item=root-ca.pem) 
skipping: [host_ubuntu2204]
skipping: [host_al_3] => (item=wazuh-1-key.pem) 
skipping: [host_al_3] => (item=wazuh-1.pem) 
skipping: [host_al2_1] => (item=root-ca.pem) 
skipping: [host_debian12]
skipping: [host_al2_1] => (item=wazuh-1-key.pem) 
skipping: [host_al2_1] => (item=wazuh-1.pem) 
skipping: [host_al_3]
skipping: [host_rhel9] => (item=root-ca.pem) 
skipping: [host_rhel9] => (item=wazuh-1-key.pem) 
skipping: [host_rhel9] => (item=wazuh-1.pem) 
skipping: [host_al2_1]
skipping: [host_rhel9]
skipping: [host_centos9] => (item=root-ca.pem) 
skipping: [host_centos9] => (item=wazuh-1-key.pem) 
skipping: [host_centos9] => (item=wazuh-1.pem) 
skipping: [host_centos9]
skipping: [host_al2_2] => (item=root-ca.pem) 
skipping: [host_al2_2] => (item=wazuh-1-key.pem) 
skipping: [host_al2_2] => (item=wazuh-1.pem) 
skipping: [host_al2_2]

TASK [wazuh-server : Rename certificates to match default names] ***************
skipping: [host_ubuntu2204] => (item={'src': 'wazuh-1-key.pem', 'dest': 'server-key.pem'}) 
skipping: [host_ubuntu2204] => (item={'src': 'wazuh-1.pem', 'dest': 'server.pem'}) 
skipping: [host_debian12] => (item={'src': 'wazuh-1-key.pem', 'dest': 'server-key.pem'}) 
skipping: [host_debian12] => (item={'src': 'wazuh-1.pem', 'dest': 'server.pem'}) 
skipping: [host_al_3] => (item={'src': 'wazuh-1-key.pem', 'dest': 'server-key.pem'}) 
skipping: [host_ubuntu2204]
skipping: [host_al_3] => (item={'src': 'wazuh-1.pem', 'dest': 'server.pem'}) 
skipping: [host_debian12]
skipping: [host_al2_1] => (item={'src': 'wazuh-1-key.pem', 'dest': 'server-key.pem'}) 
skipping: [host_al2_1] => (item={'src': 'wazuh-1.pem', 'dest': 'server.pem'}) 
skipping: [host_al_3]
skipping: [host_rhel9] => (item={'src': 'wazuh-1-key.pem', 'dest': 'server-key.pem'}) 
skipping: [host_rhel9] => (item={'src': 'wazuh-1.pem', 'dest': 'server.pem'}) 
skipping: [host_al2_1]
skipping: [host_rhel9]
skipping: [host_centos9] => (item={'src': 'wazuh-1-key.pem', 'dest': 'server-key.pem'}) 
skipping: [host_centos9] => (item={'src': 'wazuh-1.pem', 'dest': 'server.pem'}) 
skipping: [host_centos9]
skipping: [host_al2_2] => (item={'src': 'wazuh-1-key.pem', 'dest': 'server-key.pem'}) 
skipping: [host_al2_2] => (item={'src': 'wazuh-1.pem', 'dest': 'server.pem'}) 
skipping: [host_al2_2]

TASK [wazuh-server : Generate the wazuh-keystore (username)] *******************
skipping: [host_ubuntu2204]
skipping: [host_debian12]
skipping: [host_al_3]
skipping: [host_al2_1]
skipping: [host_rhel9]
skipping: [host_centos9]
skipping: [host_al2_2]

TASK [wazuh-server : Generate the wazuh-keystore (password)] *******************
skipping: [host_ubuntu2204]
skipping: [host_debian12]
skipping: [host_al_3]
skipping: [host_al2_1]
skipping: [host_rhel9]
skipping: [host_centos9]
skipping: [host_al2_2]

TASK [wazuh-server : Server-config | Edit the indexer.hosts configuration] *****
skipping: [host_ubuntu2204]
skipping: [host_debian12]
skipping: [host_al_3]
skipping: [host_al2_1]
skipping: [host_rhel9]
skipping: [host_centos9]
skipping: [host_al2_2]

TASK [wazuh-server : Server-config | Edit the communications_api.host configuration] ***
skipping: [host_ubuntu2204]
skipping: [host_debian12]
skipping: [host_al_3]
skipping: [host_al2_1]
skipping: [host_rhel9]
skipping: [host_centos9]
skipping: [host_al2_2]

TASK [wazuh-server : Server-config | Edit the management_api.host configuration] ***
skipping: [host_ubuntu2204]
skipping: [host_debian12]
skipping: [host_al_3]
skipping: [host_al2_1]
skipping: [host_rhel9]
skipping: [host_centos9]
skipping: [host_al2_2]

TASK [wazuh-server : Server-config | Remove empty lines] ***********************
skipping: [host_ubuntu2204]
skipping: [host_debian12]
skipping: [host_al_3]
skipping: [host_al2_1]
skipping: [host_rhel9]
skipping: [host_centos9]
skipping: [host_al2_2]

TASK [wazuh-server : Ensure Wazuh Server service is started and enabled.] ******
skipping: [host_ubuntu2204]
skipping: [host_debian12]
skipping: [host_al_3]
skipping: [host_al2_1]
skipping: [host_rhel9]
skipping: [host_centos9]
skipping: [host_al2_2]

TASK [wazuh-server : Remove leftover installation files] ***********************
skipping: [host_ubuntu2204]
skipping: [host_debian12]
skipping: [host_al_3]
skipping: [host_al2_1]
skipping: [host_rhel9]
skipping: [host_centos9]
skipping: [host_al2_2]

PLAY RECAP *********************************************************************
host_al2_1                 : ok=17   changed=9    unreachable=0    failed=0    skipped=22   rescued=0    ignored=2   
host_al2_2                 : ok=17   changed=10   unreachable=0    failed=0    skipped=22   rescued=0    ignored=2   
host_al_3                  : ok=17   changed=9    unreachable=0    failed=0    skipped=22   rescued=0    ignored=2   
host_centos9               : ok=17   changed=10   unreachable=0    failed=0    skipped=22   rescued=0    ignored=2   
host_debian12              : ok=15   changed=9    unreachable=0    failed=0    skipped=24   rescued=0    ignored=0   
host_rhel9                 : ok=17   changed=10   unreachable=0    failed=0    skipped=22   rescued=0    ignored=2   
host_ubuntu2204            : ok=15   changed=9    unreachable=0    failed=0    skipped=26   rescued=0    ignored=0   

🔴 Latest 5.0.0 changes

Below is the provided evidence:

Tested packages

  • wazuh_agent_url_amd64_deb:
    • s3://packages-dev.internal.wazuh.com/development/wazuh/5.x/main/packages/wazuh-agent_5.0.0-19032025_amd64_e305392.deb
  • wazuh_agent_url_amd64_rpm:
    • s3://packages-dev.internal.wazuh.com/development/wazuh/5.x/main/packages/wazuh-agent_5.0.0-19032025_x86_64_e305392.rpm

Ansible Output

Ansible Output: Agents deployment
TASK [./roles/wazuh-agent : Linux | Register Wazuh agent] **********************
fatal: [agent_ubuntu2204]: FAILED! => {"changed": true, "cmd": "/usr/share/wazuh-agent/bin/wazuh-agent --enroll-agent --user wazuh --password wazuh --url https://<REDACTED_IP>:55000 --verification-mode none\n", "delta": "0:00:00.007236", "end": "2025-03-20 04:29:59.727550", "msg": "non-zero return code", "rc": 1, "start": "2025-03-20 04:29:59.720314", "stderr": "[2025-03-20 04:29:59.726] [wazuh-agent] [critical] [CRITICAL] [main.cpp:23] [main] An error occurred: unrecognised option '--enroll-agent'.", "stderr_lines": ["[2025-03-20 04:29:59.726] [wazuh-agent] [critical] [CRITICAL] [main.cpp:23] [main] An error occurred: unrecognised option '--enroll-agent'."], "stdout": "", "stdout_lines": []}
fatal: [agent_debian12]: FAILED! => {"changed": true, "cmd": "/usr/share/wazuh-agent/bin/wazuh-agent --enroll-agent --user wazuh --password wazuh --url https://<REDACTED_IP>:55000 --verification-mode none\n", "delta": "0:00:00.006841", "end": "2025-03-20 04:29:59.823688", "msg": "non-zero return code", "rc": 1, "start": "2025-03-20 04:29:59.816847", "stderr": "[2025-03-20 04:29:59.822] [wazuh-agent] [critical] [CRITICAL] [main.cpp:23] [main] An error occurred: unrecognised option '--enroll-agent'.", "stderr_lines": ["[2025-03-20 04:29:59.822] [wazuh-agent] [critical] [CRITICAL] [main.cpp:23] [main] An error occurred: unrecognised option '--enroll-agent'."], "stdout": "", "stdout_lines": []}
fatal: [agent_al2_1]: FAILED! => {"changed": true, "cmd": "/usr/share/wazuh-agent/bin/wazuh-agent --enroll-agent --user wazuh --password wazuh --url https://<REDACTED_IP>:55000 --verification-mode none\n", "delta": "0:00:00.005754", "end": "2025-03-20 04:29:59.871520", "msg": "non-zero return code", "rc": 1, "start": "2025-03-20 04:29:59.865766", "stderr": "[2025-03-20 04:29:59.870] [wazuh-agent] [critical] [CRITICAL] [main.cpp:23] [main] An error occurred: unrecognised option '--enroll-agent'.", "stderr_lines": ["[2025-03-20 04:29:59.870] [wazuh-agent] [critical] [CRITICAL] [main.cpp:23] [main] An error occurred: unrecognised option '--enroll-agent'."], "stdout": "", "stdout_lines": []}
fatal: [agent_centos9]: FAILED! => {"changed": true, "cmd": "/usr/share/wazuh-agent/bin/wazuh-agent --enroll-agent --user wazuh --password wazuh --url https://<REDACTED_IP>:55000 --verification-mode none\n", "delta": "0:00:00.004867", "end": "2025-03-20 04:29:59.873590", "msg": "non-zero return code", "rc": 1, "start": "2025-03-20 04:29:59.868723", "stderr": "[2025-03-20 04:29:59.873] [wazuh-agent] [critical] [CRITICAL] [main.cpp:23] [main] An error occurred: unrecognised option '--enroll-agent'.", "stderr_lines": ["[2025-03-20 04:29:59.873] [wazuh-agent] [critical] [CRITICAL] [main.cpp:23] [main] An error occurred: unrecognised option '--enroll-agent'."], "stdout": "", "stdout_lines": []}
fatal: [agent_rhel9]: FAILED! => {"changed": true, "cmd": "/usr/share/wazuh-agent/bin/wazuh-agent --enroll-agent --user wazuh --password wazuh --url https://<REDACTED_IP>:55000 --verification-mode none\n", "delta": "0:00:00.007147", "end": "2025-03-20 04:29:59.898077", "msg": "non-zero return code", "rc": 1, "start": "2025-03-20 04:29:59.890930", "stderr": "[2025-03-20 04:29:59.897] [wazuh-agent] [critical] [CRITICAL] [main.cpp:23] [main] An error occurred: unrecognised option '--enroll-agent'.", "stderr_lines": ["[2025-03-20 04:29:59.897] [wazuh-agent] [critical] [CRITICAL] [main.cpp:23] [main] An error occurred: unrecognised option '--enroll-agent'."], "stdout": "", "stdout_lines": []}
fatal: [agent_al2_2]: FAILED! => {"changed": true, "cmd": "/usr/share/wazuh-agent/bin/wazuh-agent --enroll-agent --user wazuh --password wazuh --url https://<REDACTED_IP>:55000 --verification-mode none\n", "delta": "0:00:00.005771", "end": "2025-03-20 04:30:01.984263", "msg": "non-zero return code", "rc": 1, "start": "2025-03-20 04:30:01.978492", "stderr": "[2025-03-20 04:30:01.983] [wazuh-agent] [critical] [CRITICAL] [main.cpp:23] [main] An error occurred: unrecognised option '--enroll-agent'.", "stderr_lines": ["[2025-03-20 04:30:01.983] [wazuh-agent] [critical] [CRITICAL] [main.cpp:23] [main] An error occurred: unrecognised option '--enroll-agent'."], "stdout": "", "stdout_lines": []}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment