If you have root access to your box, you can utilize the following link in order to install Ansible. I would recommend Ansible 2.1 & later version if your goal is to utilize Ansible as a Network Automation tool.
Creating a Virtual Environment with Ansible:
If you don’t have root access to the bastion host that is used to access the network infrastructure, you can utilize ansible in virtual environment.
pip install --upgrade pip virtualenv virtualenvwrapper virtualenv ansible2.1 source ansible2.1/bin/activate pip install ansible==2.2.1
Whenever required, the virtual environment can be accessed using:
root@ansible:~$ source ansible2.1/bin/activate (ansible2.1)root@ansible:~$ ansible --version ansible 184.108.40.206 config file = configured module search path = Default w/o overrides