Ansible upgrade testing - version number isn't tracking?

Hi all -

I’m testing out upgrading to a later version of Ansible and how my playbooks would need to be modified prior to actually doing the upgrade. In order to test this out, I’m doing the following:

  • Deleting /usr/bin/ansible* (yes - I had done the install of ansible up until now - due to multiple users on the system)
  • Deleting /usr/share/ansible
  • Go into my local github clone of ansible, rm -rf all contents
  • “git checkout release1.6.1” (random non-devel version test higher than I really need to support Tower, just to see how my playbooks are affected)
  • python setup.py build
  • source hacking/env-setup

My playbooks require modification (coming from 1.3.1 and apparent variable changes that no longer allow the ${var} notation it appears, perhaps more) - but don’t want to take that on just yet. So I start backing down versions to see what version I can run without modifying playbooks. So I run this:

  • “git checkout release1.4.0”

  • python setup.py build

  • source hacking/env-setup

For some strange reason, after completely resetting my environment, “ansible --version” is still returning “ansible 1.6.1”. I’ll even do an “rm -rf” on my source directory, do a “git reset --hard” and do a complete rebuild, nothing. What am I missing here - where is that version number coming from, because I’m concerned I’m not hitting the right thing, or I still have something hanging around that could make stability an issue.

Running a “which ansible” returns the following, so I’m pretty sure I’m pulling the right executable: ~/gitroot/ansible/bin/ansible

Thoughts?

… aaaaand as is usual for me, I dug deeper and realized that there were some packages installed in /usr/lib/python2.6/site-packages. So I ran “easy_install pip”, then ran “sudo pip uninstall ansible” until it gave me an error that nothing was left to uninstall (took about 9 runs to get all the various .egg files removed), then did an “rm -rf ansible” in that site-packages directory to remove ansible’s files from there as well. That cleared the problem right up - which means I was pulling at least some of the files from another release (at least init.py) - so this would not have been a good thing.

Someone clarify if I did this the wrong way, but it appears to be working for now…

Not sure what is going on with pip in your case, but there’s nothing in Ansible’s pip configuration that running it 8 vs 9 times would change :slight_smile:

Ansible 1.4 is quite old though and there have been security updates in the 1.5 series, you should take the time to fix variable issues for sure so you can be running the latest.

I’d probably recommend yum or apt as an install source if you want the easiest way to manage packages.