I’m a huge fan of the roots.io toolset for building and deploying high-quality WordPress sites. Part of that toolset is Trellis – a provisioning and deployment automation tool which typically requires a specific version of Ansible.

You can install a specific version of Ansible via Pip with the following command:

pip install ansible==

Just replace with the version you require.

Note: Since this globally installs Ansible, you’ll probably need to run the command as root using sudo.