How to downgrade Ansible 2.1.1.0 to 2.0.2?

For compatibility reasons, I need to use Ansible 2.0.2.

When I try with apt-get I can only find versions 2.1.1, 1.7.2 and 1.5.4.

How can I downgrade to 2.0.2 specifically?

1

1 Answer

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 in Python to keep several versions available. There is more information about Python virtual environments here.

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like