Yum module state=latest => update or install

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 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.)

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

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

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.)