From f31e55483437a9a88c17948eeda582405d86a00f Mon Sep 17 00:00:00 2001 From: Jesus Garcia Date: Mon, 20 Jan 2025 08:12:59 -0500 Subject: [PATCH] Add Ansible playbook for deploying Wazuh agent on Linux, MacOs and Windows hosts --- CHANGELOG.md | 1 + wazuh-agent.yml | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 wazuh-agent.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index dab15664a..6bc1b4420 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file. ### Changed - Update AWS credentials actions in GHA workflows to use 'v4' instead of 'v3' ([#1492](https://github.com/wazuh/wazuh-ansible/pull/1492)) \- (Workflows) +- Refactor Ansible playbook for Wazuh agent ([#1492](https://github.com/wazuh/wazuh-ansible/pull/1492)) ## [v4.10.2] diff --git a/wazuh-agent.yml b/wazuh-agent.yml new file mode 100644 index 000000000..8a3114588 --- /dev/null +++ b/wazuh-agent.yml @@ -0,0 +1,17 @@ +- hosts: agents + vars: + wazuh_server_addresses: + - "" + tasks: + - name: Include wazuh-agent role for Linux hosts + block: + - include_role: + name: ./roles/wazuh-agent + become: yes + become_user: root + when: ansible_os_family != "Windows" + + - name: Include wazuh-agent role for Windows hosts + include_role: + name: ./roles/wazuh-agent + when: ansible_os_family == "Windows"