update of ansible seems to be inconsistent

Hello folks,

we have a Ubuntu 14.04 box running Ansible and Ansible-Tower on it. The packages are updates regularly. The Ansible mirror is also listed in the sources.list, so it gets updates too. But there seem to be something wrong. I’m thinking this because

  1. When I do a ansible --version it shows 2.0.0.2

ansible@DE9899S76 ~ % ansible --version
ansible 2.0.0.2
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides

  1. apt-get -u -V upgrade says there are no upgrade pending. The ansible package is not locked or pinned in apt.

  2. apt-cache --showpkg ansible says it’ 2.2.0.0

  3. Playbooks with the synchronize module have a problem that has been solved in version 2.1, as far as I’ve read. When you use this module with become: yes, sudo is not used on the remote machine but on the ansible server.

http://cheat.readthedocs.io/en/latest/ansible/synchronize.html

So it looks to me like some parts have been updated to version 2.2.0.0 and others not. Can anybody explain this to me or has any tips for me to get this riddle solved? Any help would be appreciated :slight_smile:

ons 2016-12-07 klockan 03:52 -0800 skrev Sebastian S.:

ansible@DE9899S76 ~ % ansible --version
ansible 2.0.0.2
....
3. apt-cache --showpkg ansible says it' 2.2.0.0

What does `which ansible` say?

That is, any chance that you have an additional version of Ansible
installed, in addition to what is provided by the package manager?

// Andreas

Hi,

which ansible says: /usr/local/bin/ansible

I did a apt-get remove for ansible-tower and ansible and reinstalled both with the bundled installer, no difference.
Didn’t wanted to make a apt-get purge, because I do not want to configure everything again, but meanwhile i think about a complete new installation…

ons 2016-12-07 klockan 23:40 -0800 skrev Sebastian S.:

which ansible says: /usr/local/bin/ansible

That looks more like somewhere where Pip would install Ansible, or
where someone would install Ansible manually. Any chance that you also
have a /usr/bin/ansible, which better match the apt version?

// Andreas

In fact there is one. But when I run this one something goes wrong:

ansible@DE9899S76 /etc/ansible/roles % /usr/bin/ansible
Traceback (most recent call last):
File “/usr/bin/ansible”, line 46, in
from ansible.module_utils._text import to_text
ImportError: No module named _text

You were right. There was a ansible pip installation. I uninstalled it and ansible --version is now correct. Thank you!! ^^

I don’t know how much different Debian and Ubuntu can be there.
My Debian installation, done with Pip gives the same answer.

When you are installing from pip, you are platform independent for the most part (except assmblr/C/etc… compiles).
When you install via a package manager, it’s a package tweaked specifically for you platform (install location mostly).