How to downgrade Ansible 2.1.1.0 to 2.0.2?

Solution 1:

Ansible is distributed as a Python package published in PyPI and it's better to use pip. So uninstall the APT-installed package and execute:

pip install -I ansible==2.0.2

Depending on your configuration (and current state) you might need to install some dependencies. From my experience the following make Ansible work flawlessly. Try first to rely on automatically installed package dependencies, but if you encounter errors, use them as a reference:

  • APT packages
    • python-setuptools
    • python-dev
    • autoconf  (required for pip install pycrypto)
    • g++  (required for pip install pycrypto)
    • python2.7-dev  (required for pip install pycrypto)
    • sshpass  (required for using Ansible with plain text passwords)
    • build-essential
    • libssl-dev
    • libffi-dev
  • Pip packages
    • paramiko
    • PyYAML
    • Jinja2
    • httplib2
    • six

You might consider using virtual environments like virtualenv in Python to keep several versions available. There is more information about Python virtual environments here.