# Ansible 2.0 -- the "new" correct way to update??

**URL:** <https://forum.ansible.com/t/ansible-2-0-the-new-correct-way-to-update/20229>\
**Category:** Ansible Project\
**Created:** [January 15, 2016, 4:29pm UTC](https://forum.ansible.com/t/ansible-2-0-the-new-correct-way-to-update/20229 "2016-01-15T16:29:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Levitt](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@Jason\_Levitt](https://forum.ansible.com/u/Jason_Levitt)\
**Post date:** [January 15, 2016, 4:29pm UTC](https://forum.ansible.com/t/ansible-2-0-the-new-correct-way-to-update/20229/1 "2016-01-15T16:29:58Z")

</div>

As you may recall, I had to uninstall Ansible 1.9.4 in order to install Ansible 2.0.0.0. But now, upgrading to Ansible 2.0.0.2 succeeds but has no effect.  
I’m on MacOSX El Capitan (10.11.2)

`$ ansible --version ansible 2.0.0.0 config file = configured module search path = Default w/o overrides $`

`$ sudo -H pip install --upgrade ansible --user python Password: Collecting ansible Downloading ansible-2.0.0.2.tar.gz (1.5MB) 100% |################################| 1.5MB 258kB/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.2 setuptools-1.1.6 $`

`$ ansible --version ansible 2.0.0.0 config file = configured module search path = Default w/o overrides $`

What is the correct way to handle updates going forward?

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [January 15, 2016, 4:34pm UTC](https://forum.ansible.com/t/ansible-2-0-the-new-correct-way-to-update/20229/2 "2016-01-15T16:34:20Z")

</div>

The problem is with a new 'protection' in OS X 'el capitan' which  
breaks the pip update, this is not restricted to Ansible but to any  
pip package you install with sudo.

[https://github.com/ansible/ansible/issues/13820](https://github.com/ansible/ansible/issues/13820)

---

<div class="post-metadata">

**Author:** ![Jason\_Levitt](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@Jason\_Levitt](https://forum.ansible.com/u/Jason_Levitt)\
**Post date:** [January 15, 2016, 4:39pm UTC](https://forum.ansible.com/t/ansible-2-0-the-new-correct-way-to-update/20229/3 "2016-01-15T16:39:29Z")

</div>

Ok, so going forward, it appears that I need to uninstall the old version, and then install the new version.

---

<div class="post-metadata">

**Author:** ![Jeff](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@Jeff](https://forum.ansible.com/u/Jeff)\
**Post date:** [January 15, 2016, 5:33pm UTC](https://forum.ansible.com/t/ansible-2-0-the-new-correct-way-to-update/20229/4 "2016-01-15T17:33:22Z")

</div>

There is no need to use sudo with --user. You should pick one or the other.

sudo will install as root into /usr/local/bin, whereas --user installed into your home directory under .local/

---

<div class="post-metadata">

**Author:** ![Larry\_Smith1](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@Larry\_Smith1](https://forum.ansible.com/u/Larry_Smith1)\
**Post date:** [January 18, 2016, 7:58pm UTC](https://forum.ansible.com/t/ansible-2-0-the-new-correct-way-to-update/20229/5 "2016-01-18T19:58:08Z")

</div>

I ended up going down the virtualenv path for this. Covers OSX as well as Linux. I went this path in order to have the ability to switch back and forth between versions in order to test functionality between 1.9.x and 2.0

[http://everythingshouldbevirtual.com/ansible-setting-up-an-ansible-control-machine-part-1](http://everythingshouldbevirtual.com/ansible-setting-up-an-ansible-control-machine-part-1)

---

<div class="post-metadata">

**Author:** ![Chris\_Short](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@Chris\_Short](https://forum.ansible.com/u/Chris_Short)\
**Post date:** [January 18, 2016, 8:07pm UTC](https://forum.ansible.com/t/ansible-2-0-the-new-correct-way-to-update/20229/6 "2016-01-18T20:07:04Z")

</div>

It seems to me that the issue revolves around upgrading setuptools. I’m totally okay with uninstalling and reinstalling Ansible but I am curious about “better” ways of upgrading if people would like to share them.

---

<div class="post-metadata">

**Author:** ![Rilindo\_Foster](https://avatars.discourse-cdn.com/v4/letter/r/46a35a/32.png) [@Rilindo\_Foster](https://forum.ansible.com/u/Rilindo_Foster)\
**Post date:** [January 19, 2016, 4:09pm UTC](https://forum.ansible.com/t/ansible-2-0-the-new-correct-way-to-update/20229/7 "2016-01-19T16:09:21Z")

</div>

I switched over to Homebrew to install current release of Ansible (after removing the prior release with pip).

---

<div class="post-metadata">

**Author:** ![Glenn\_Barnard](https://avatars.discourse-cdn.com/v4/letter/g/8baadc/32.png) [@Glenn\_Barnard](https://forum.ansible.com/u/Glenn_Barnard)\
**Post date:** [January 20, 2016, 7:39pm UTC](https://forum.ansible.com/t/ansible-2-0-the-new-correct-way-to-update/20229/8 "2016-01-20T19:39:48Z")

</div>

I echo Chris’s post. The docs say for yum the command is sudo yum install ansible. But that still only gets you 1.9.4. When will Ansible update YUM with 2.0???

Thank you Slim…the info in your post worked. I now have 2.0. :-}

---

<div class="post-metadata">

**Author:** ![Marcus\_Franke](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@Marcus\_Franke](https://forum.ansible.com/u/Marcus_Franke)\
**Post date:** [January 21, 2016, 7:21am UTC](https://forum.ansible.com/t/ansible-2-0-the-new-correct-way-to-update/20229/9 "2016-01-21T07:21:43Z")

</div>

Glenn, the new 2.0 rpm packages are in the epel-test channel and will stay there for a while. That’s kind of a policy with the epel project.

If they would push the package to the main epel repository it would break all those setups that are not ready yet for the update.
