Ansible 2.0 Upgrade Appears to Succeed But Fails?

206 views
Skip to first unread message

Slim Slam

unread,
Jan 12, 2016, 11:24:04 AM1/12/16
to Ansible Project
I ran my usual Ansible upgrade for Ansible on my MacOSX (v10.11) laptop and it appeared to upgrade me:

$ sudo -H pip install --upgrade ansible --user python
Password:
Collecting ansible
 
Downloading ansible-2.0.0.0.tar.gz (1.5MB)
   
100% |################################| 1.5MB 172kB/s
Requirement already up-to-date: python in /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
Requirement already up-to-date: paramiko in /Library/Python/2.7/site-packages (from ansible)
Requirement already up-to-date: jinja2 in /Library/Python/2.7/site-packages (from ansible)
Requirement already up-to-date: PyYAML in /Library/Python/2.7/site-packages (from ansible)
Collecting setuptools (from ansible)
 
Using cached setuptools-19.2-py2.py3-none-any.whl
Requirement already up-to-date: pycrypto>=2.6 in /Library/Python/2.7/site-packages (from ansible)
Requirement already up-to-date: ecdsa>=0.11 in /Library/Python/2.7/site-packages (from paramiko->ansible)
Requirement already up-to-date: MarkupSafe in /Library/Python/2.7/site-packages (from jinja2->ansible)
Installing collected packages: setuptools, ansible
 
Running setup.py install for ansible
Successfully installed ansible-2.0.0.0 setuptools-1.1.6
$

However, when I type this at the command line, I'm still on v1.94:

$ ansible --version
ansible
1.9.4
  configured
module search path = None
$

Anyone know what's going on here?

J


Allan Lewis

unread,
Jan 12, 2016, 12:27:29 PM1/12/16
to Ansible Project
Do `which -a ansible`: are you using the Ansible you installed (probably to `~/.local.bin`) or the system Ansible, installed through your package manager (probably in `/usr/bin`)? If the latter, you need to add Pip's user-bin to your PATH.

Slim Slam

unread,
Jan 12, 2016, 12:38:20 PM1/12/16
to Ansible Project
Not sure how to interpret these. It doesn't seem to me like the installation worked....(?)

$ which -a ansible
/usr/local/bin/ansible
/usr/local/bin/ansible
$

$ sudo find / -name ansible -print
/Library/Python/2.7/site-packages/ansible
/private/var/root/Library/Python/2.7/bin/ansible
/private/var/root/Library/Python/2.7/lib/python/site-packages/ansible
/usr/local/bin/ansible
/usr/local/lib/python2.7/site-packages/ansible
$

Slim Slam

unread,
Jan 12, 2016, 2:47:49 PM1/12/16
to Ansible Project
Interesting. If I use sudo's -H flag, it tries to uninstall Ansible 2.0:

$ sudo -H pip uninstall ansible
Uninstalling ansible-2.0.0.0:
 
/private/var/root/Library/Python/2.7/bin/ansible
 
/private/var/root/Library/Python/2.7/bin/ansible-doc
 
...
 
...


But if I don't, it tries to uninstall ansible 1.9.4:

$ sudo pip uninstall ansible
The directory '/Users/myuser/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Uninstalling ansible-1.9.4:
  /Library/Python/2.7/site-packages/ansible-1.9.4-py2.7.egg-info
  /Library/Python/2.7/site-packages/ansible/__init__.py
  ....
  .....


-J

Brian Coca

unread,
Jan 12, 2016, 2:49:51 PM1/12/16
to Ansible Project
if you are on OS X there is an issue with the 'protected filesystem'
which does not allow sudo + pip --upgrade to work. you need to
uninstall and reinstall Ansible.
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/057851b5-95da-4a23-84b7-02fc3511e9f2%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Brian Coca

Slim Slam

unread,
Jan 12, 2016, 2:50:23 PM1/12/16
to Ansible Project
So I uninstalled both of them (see below), and then ran my original install command again and now
Ansible 2.0 is installed. 

J

David Njuki

unread,
Jan 13, 2016, 1:34:51 AM1/13/16
to ansible...@googlegroups.com
On OS X El Capitan, I used "--ignore-installed"  when upgrading so as to overcome the permissions issue.  

$ sudo pip install ansible --upgrade --ignore-installed 



For more options, visit https://groups.google.com/d/optout.



--

Regards,
@njukey
Reply all
Reply to author
Forward
0 new messages