Installing Ansible
Install Ansible on a single control server. From this server, Ansible connects to remote endpoints and runs playbooks to deploy or configure Wazuh components.
Perform the following to install Ansible:
Installation on CentOS/RHEL/Fedora
Install the EPEL repository:
# yum -y install epel-release
Install Ansible:
# yum install ansible
Install Ansible using pip.
# pip3 install --upgrade --ignore-installed pip setuptools --user # python3 -m pip install --user ansible
Note
You have to create the default configuration file
/etc/ansible/ansible.cfgand/etc/ansible/hostsinventory file if they are not created automatically. Please follow the steps below:Create the
/etc/ansible/ansible.cfgconfig file.# sudo mkdir -p /etc/ansible # sudo touch /etc/ansible/ansible.cfg
Edit
/etc/ansible/ansible.cfgand add the following content.[defaults] inventory = /etc/ansible/hosts host_key_checking = False
Installation on Debian/Ubuntu
Update the repositories and install required dependencies:
# apt-get update
Setup Ansible repository:
# apt-get install lsb-release software-properties-common # apt-add-repository -y ppa:ansible/ansible # apt-get update
# sudo apt-get install -y curl gnupg lsb-release # curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x93C4A3FD7BB9C367" | sudo gpg --dearmor -o /usr/share/keyrings/ansible.gpg # echo "deb [signed-by=/usr/share/keyrings/ansible.gpg] http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" | \ sudo tee /etc/apt/sources.list.d/ansible.list # sudo apt-get update
Install Ansible:
# apt-get install ansible