This Blog is to share our knowledge and expertise on Linux System Administration and VMware Administration

Tuesday, July 10, 2018

How to upgrade Ansible by using PIP?

Tuesday, July 10, 2018 0
What is PIP

PIP is a package management system used to install and manage software packages written in Python. If you do not have PIP installed, we can download and install it from this page: https://pypi.org/project/pip/

Download the required ansible tar.gz package from below URL.

https://releases.ansible.com/ansible/

Here i already have ansible 2.0 running on this server. I need to upgrade it to 2.2.

[root@ansibleserver nskselvan]# pip install ansible-2.2.0.0.tar.gz
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
Processing ./ansible-2.2.0.0.tar.gz
Requirement already satisfied: paramiko in /usr/local/lib/python2.6/site-packages/paramiko-1.15.2-py2.6.egg (from ansible==2.2.0.0)
Requirement already satisfied: jinja2 in /usr/local/lib/python2.6/site-packages/Jinja2-2.8-py2.6.egg (from ansible==2.2.0.0)
Requirement already satisfied: PyYAML in /usr/local/lib/python2.6/site-packages (from ansible==2.2.0.0)
Requirement already satisfied: setuptools in /usr/local/lib/python2.6/site-packages/setuptools-18.1-py2.6.egg (from ansible==2.2.0.0)
Requirement already satisfied: pycrypto>=2.6 in /usr/local/lib/python2.6/site-packages (from ansible==2.2.0.0)
Requirement already satisfied: ecdsa>=0.11 in /usr/local/lib/python2.6/site-packages/ecdsa-0.13-py2.6.egg (from paramiko->ansible==2.2.0.0)
Requirement already satisfied: MarkupSafe in /usr/local/lib/python2.6/site-packages/MarkupSafe-0.23-py2.6-linux-x86_64.egg (from jinja2->ansible==2.2.0.0)
Installing collected packages: ansible
  Found existing installation: ansible 2.0.0.1
    Uninstalling ansible-2.0.0.1:
      Successfully uninstalled ansible-2.0.0.1
  Running setup.py install for ansible ... done
Successfully installed ansible-2.2.0.0
[root@ansibleserver nskselvan]#

[root@ansibleserver nskselvan]# ansible --version
ansible 2.2.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
[root@ansibleserver nskselvan]#

Note : For safer side, please take the backup of all necessary files.