Ansible requires python for to operate, there are multiple ways to install Ansible , but it is better to install with python installation .
- You will need Python2 or Python3
- python pip and install Ansible
- First update repository using apt-get update
- Check if Python is installed , if installed
- Install Python3-pip
- Install Ansible using Pip install and verify
$ sudo apt-get update

Check if python3 is already installed
$apt list –installed |grep -i python

As you can see python3 is installed
We need to install PIP using following command
$sudo apt-get install python3-pip

Installing Ansible using Pip
$pip3 install ansible

Verifying Ansible installation
$ansible –version
