Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

We're using Ansible for a lot of our deployments. This agent-less configuration management tool requires almost no overhead, and this low barrier of entrance to entry enables people from our community to contribute deployment code. So far so good.

The Ansible code has seen a few major changes over the last years, which unfortunately causes cause some features to change, disappear, or even break.

It is impractical to refactor large projects to work with the latest Ansible version, so there sometimes there is a need to use to specific Ansible versions for a deploymentspecific deployments.

On my MacOS computer I usually use the HomeBrew package manager , which works OK for Ansibleto provide me with Ansible, and this OK. Switching between different Ansible versions is possible, but in practise this is only possible works if you have cached the old version, i.e. you have been installing and updating versions continuously. Picking a random older version is very tedious at best.

...

This allows you to isolate a complete python environment, and install a specific version of Ansible. With the help of some bash aliases this you can be conveniently automatedswitch between all versions.

Assuming you have the required basic tools available, install this in your home directory:

...

Code Block
alias ansible-activate-2.3.3="source ~/.virtualenv/ansible-2.3.3/bin/activate"


You you can just type ansible-activate and use tab completion to pick the specific version.

...