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"