apt update
apt install ansible
dnf install epel-release
dnf install ansible
zypper install ansible
sudo apt update
sudo apt install ansible
If you don't like the distribution package for some reason, you can perform the installation via Python PIP:
- Install the
python3-pip
distribution package pip3 install ansible
This will not always get you the newest version, because newer Ansible versions require newer versions of Python!