You can run Ansible from a source code checkout (we will look at Git as a version control mechanism in Chapter 11, Working with Git):
$ git clone https://github.com/ansible/ansible.git --recursive$ cd ansible/$ source ./hacking/env-setup...Setting up Ansible to run out of checkout...$ ansible --versionansible 2.7.0.dev0 (devel cde3a03b32) last updated 2018/07/11 08:39:39 (GMT -700) config file = /etc/ansible/ansible.cfg...
To run different versions, we can simply use git checkout for the different branch or tag and perform the environment setup again:
$ git branch -a$ git tag --list $ git checkout v2.5.6...HEAD is now at 0c985fe... New release v2.5.6$ source ./hacking/env-setup$ ansible --version ...