sudo apt update -y
sudo apt install software-properties-common -y
sudo add-apt-repository --yes --update ppa:ansible/ansible
sudo apt install ansible -y
ssh-keygen -t rsa -b 2048
Copy this key and we'll add to agent server later.
Paste the given keys to authorized_keys of wazuh agent server.
nano ~/.ssh/authorized_keys
ansible all -i inventory/hosts -m ping