feat: install wazuh agent in packages role; remove unused deployment files

Wazuh agent:
- packages role now copies the local wazuh-agent RPM to the host, installs
  it via dnf, points /var/ossec/etc/ossec.conf at wazuh.boxswapper.io,
  and enables/starts the wazuh-agent service
- new vars: wazuh_agent_rpm, wazuh_server_address (manager version 4.14.1
  matches the agent RPM)

Cleanup of files not used by the ansible deployment:
- removed wazuh-docker/docker-compose.yml, generate-indexer-certs.yml,
  README.md (role generates certs via podman run, config/ dir is the
  only part referenced)
- removed committed .omo/ session data (already gitignored)

Done by Sisyphus.
This commit is contained in:
2026-09-16 09:33:42 -06:00
parent 170146efb1
commit 3e7939b682
7 changed files with 30 additions and 163 deletions

View File

@@ -11,3 +11,28 @@
- fail2ban
- python3-libdnf5
state: present
- name: Copy Wazuh agent RPM to host
ansible.builtin.copy:
src: "{{ playbook_dir }}/{{ wazuh_agent_rpm }}"
dest: "/tmp/{{ wazuh_agent_rpm }}"
owner: root
group: root
mode: '0644'
- name: Install Wazuh agent RPM
ansible.builtin.dnf:
name: "/tmp/{{ wazuh_agent_rpm }}"
state: present
- name: Point Wazuh agent at Wazuh manager
ansible.builtin.replace:
path: /var/ossec/etc/ossec.conf
regexp: '<address>MANAGER_IP</address>'
replace: '<address>{{ wazuh_server_address }}</address>'
- name: Enable and start Wazuh agent
ansible.builtin.systemd:
name: wazuh-agent
enabled: true
state: started