Files
Internal-apps/roles/packages/tasks/main.yml
boxswapper 3e7939b682 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.
2026-09-16 09:33:42 -06:00

39 lines
871 B
YAML

---
- name: Update Packages
ansible.builtin.dnf:
update_cache: yes
- name: Install Packages
ansible.builtin.dnf:
name:
- vim
- podman
- 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