wazuh + doc

This commit is contained in:
phil
2025-02-02 11:33:01 +01:00
parent 9fe6b402c6
commit 09ec8a80bd
5 changed files with 56 additions and 21 deletions

View File

@@ -0,0 +1,25 @@
---
- hosts: all
become: true
tasks:
- name: Recup clefs depot
ansible.builtin.shell: curl -s https://packages.wazuh.com/key/GPG-KEY-WAZUH | gpg --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/wazuh.gpg --import && chmod 644 /usr/share/keyrings/wazuh.gpg
- name: Ajoute depot
ansible.builtin.shell: echo "deb [signed-by=/usr/share/keyrings/wazuh.gpg] https://packages.wazuh.com/4.x/apt/ stable main" | tee -a /etc/apt/sources.list.d/wazuh.list
- name: Update apt
ansible.builtin.apt:
update_cache: yes
- name: Installation wazuh-agent et liaison wazuh-server
ansible.builtin.shell: "WAZUH_MANAGER={{ srv_ip }} apt-get install wazuh-agent"
- name: Relance wazuh-agent
ansible.builtin.systemd:
name: wazuh-agent
state: restarted
enabled: true
daemon_reload: true