Wazuh Ansible installation Part 2

9 views
Skip to first unread message

Max

unread,
Dec 5, 2025, 6:01:02 AM (2 days ago) Dec 5
to Wazuh | Mailing List
Hi All,

what if I want to install additional Dashboard nodes in the wazuh ansible installation how would I go about to doing it?

are there plans in doing that kind of installation?

Thank you and best regards,
Max

leon....@wazuh.com

unread,
Dec 5, 2025, 1:19:59 PM (2 days ago) Dec 5
to Wazuh | Mailing List
Hello Max,

Yes, multiple Dashboard nodes are supported for high availability, though it requires some manual configuration. Based on the Ansible cluster documentation, we can tweak a few things to add another dashboard node. https://documentation.wazuh.com/current/deployment-options/deploying-with-ansible/guide/install-wazuh-cluster.html

1. First, update your /etc/ansible/hosts file to include both dashboard nodes:

[wi_cluster]
wi1 ansible_host=<WI1_IP> private_ip=<WI1_IP>
wi2 ansible_host=<WI2_IP> private_ip=<WI2_IP>
wi3 ansible_host=<WI3_IP> private_ip=<WI3_IP>

[manager]
manager ansible_host=<MANAGER_IP> private_ip=<MANAGER_IP>

[worker]
worker ansible_host=<WORKER_IP> private_ip=<WORKER_IP>

[dashboard]
dashboard1 ansible_host=<DASHBOARD1_IP> private_ip=<DASHBOARD1_IP>
dashboard2 ansible_host=<DASHBOARD2_IP> private_ip=<DASHBOARD2_IP>

[wi1]
wi1 ansible_host=<WI1_IP> private_ip=<WI1_IP>

2. Modify the playbook to include the new dashboard node in the certificate generation and the node itself. Here is a reduced version, so that you can have it as a reference:

---
# Certificates generation
    - hosts: wi1
      roles:
        - role: ../roles/wazuh/wazuh-indexer
          indexer_network_host: "{{ private_ip }}"
          indexer_cluster_nodes:
            - "{{ hostvars.wi1.private_ip }}"
            - "{{ hostvars.wi2.private_ip }}"
            - "{{ hostvars.wi3.private_ip }}"
          indexer_discovery_nodes:
            - "{{ hostvars.wi1.private_ip }}"
            - "{{ hostvars.wi2.private_ip }}"
            - "{{ hostvars.wi3.private_ip }}"
          perform_installation: false
      become: no
      vars:
        indexer_node_master: true
        instances:
          node1:
            ....
          node6:
            name: node-6
            ip: "{{ hostvars.dashboard1.private_ip }}"  # dashboard -> dashboard1
            role: dashboard
          node7:                                         # Second dashboard
            name: node-7
            ip: "{{ hostvars.dashboard2.private_ip }}"
            role: dashboard
      tags:
        - generate-certs
....
# Wazuh dashboard nodes
    - hosts: dashboard
      roles:
        - role: "../roles/wazuh/wazuh-dashboard"
      become: yes
      become_user: root
      vars:
        indexer_network_host: "{{ hostvars.wi1.private_ip }}"
        indexer_cluster_nodes:
          - "{{ hostvars.wi1.private_ip }}"
          - "{{ hostvars.wi2.private_ip }}"
          - "{{ hostvars.wi3.private_ip }}"
        dashboard_node_name: "{{ inventory_hostname }}"  # Will use dashboard1/dashboard2 automatically
        wazuh_api_credentials:
          - id: default
            url: https://{{ hostvars.manager.private_ip }}
            port: 55000
            username: custom-user
            password: SecretPassword1!
        ansible_shell_allow_world_readable_temp: true

3. Finally, you can run the playbook
ansible-playbook wazuh-production-ready.yml -b -K

I hope this helped,
Let me know if you need anything else.
Reply all
Reply to author
Forward
0 new messages