# Yum module state=latest =\> update or install

**URL:** <https://forum.ansible.com/t/yum-module-state-latest-update-or-install/13250>\
**Category:** Ansible Project\
**Created:** [August 2, 2013, 8:52pm UTC](https://forum.ansible.com/t/yum-module-state-latest-update-or-install/13250 "2013-08-02T20:52:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Drew\_Northup](https://avatars.discourse-cdn.com/v4/letter/d/e5b9ba/32.png) [@Drew\_Northup](https://forum.ansible.com/u/Drew_Northup)\
**Post date:** [August 2, 2013, 8:52pm UTC](https://forum.ansible.com/t/yum-module-state-latest-update-or-install/13250/1 "2013-08-02T20:52:19Z")

</div>

My python-fu isn’t as good as my skills in some other languages, so after looking at the sources I am still not 100% sure what is supposed to happen when I run “yum: name=\* state=latest” (in this case from inside of a playbook).

The Github issue [https://github.com/ansible/ansible/issues/269](https://github.com/ansible/ansible/issues/269) implies that this would install everything known to the repository (or repositories), but the documentation seems to me to be mute on what is intended for this case. If this is the case, is there some other “best practices” way of updating a “brand new” host (one of those cases when you actually want to update everything already installed and not pick/choose)?

I understand the attempt at idempotency, but frankly that can be confusing when it makes operations context-sensitive. (I also dislike the fact that this may be foreclosing upon using an existing interface to do what is a fairly common operation.)

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [August 2, 2013, 11:07pm UTC](https://forum.ansible.com/t/yum-module-state-latest-update-or-install/13250/2 "2013-08-02T23:07:09Z")

</div>

Pretty sure this is here to _update_ everything currently installed in one step.

Last paragraph didn’t parse for me, please be less theoretical 🙂

---

<div class="post-metadata">

**Author:** ![Drew\_Northup](https://avatars.discourse-cdn.com/v4/letter/d/e5b9ba/32.png) [@Drew\_Northup](https://forum.ansible.com/u/Drew_Northup)\
**Post date:** [August 6, 2013, 2:17pm UTC](https://forum.ansible.com/t/yum-module-state-latest-update-or-install/13250/3 "2013-08-06T14:17:46Z")

</div>

Well, I can vouch for the fact that it checks "\*" for the versions, which  
in the RHEL6 base repo could take a while (and we have a local RHN proxy,  
so it isn't like when I do connect off-host for information that I'm going  
that far).  
I'm not a python genius, but if I come up with a way to speed this up I'll  
be sure to let you know.

(I am full well aware that part of the reason why "yum check-update" comes  
up with an answer as fast as it does is because RHN has already cached that  
information in the web management gadget's backing DB. I have definitely  
caused it to puke a corner case on occasion--a minor and temporary error  
caused by admin impatience.)
