How to upgrade Ansible to 2.2.1 on Debian 8.7

Upgrading to Ansible 2.2.1 on Debian (validated on version 8.7) requires some pre-requisites to be in place, below are the steps required to upgrade.

Ensure that sudo is installed (skip this step if you already know that it is):

apt-get install sudo

Upgrade all packages:

sudo apt-get update
sudo apt-get upgrade

Install build pre-requisites:

sudo apt-get install build-essential libssl-dev libffi-dev python-dev

Upgrade to the latest version of the Cryptography module:

sudo pip install cryptography --upgrade

If you encounter errors with the above command, run the following to reinstall PIP from the official PIP website as referred to at https://github.com/pypa/get-pip.

sudo apt-get purge -y python-pip
sudo wget https://bootstrap.pypa.io/get-pip.py
sudo python ./get-pip.py
sudo apt-get install python-pip

Finally, upgrade Ansible to the latest version:

sudo pip install ansible --upgrade
%d bloggers like this: