ansible/ansible — pull request #4931 by mscherer (2013-11-17 14:42:34+00:00)
Title: Various fix for the urpmi module

Testing the urpmi module yesterday, I noticed a few bug.
The first one is that urpmi will always return 0 even when there is nothing to install, thus always flagging 'changed' to True, even when there was nothing. This is inconsistent with others modules behavior.

I also added a small optimisation, by using rpm python module directly rather than calling rpm, this avoid the cost of fork and exec which would help if you need to install and verify lots of package. Since python-rpm is not installed by default ( unlike on yum based distribution ), the code will fallback to fork/exec if this doesn't work.

I may push others fix later:
- urpmi --force always return 0, so urpmi do not detect if we give a wrong rpm name, and always return success
- urpmi module do not support 'latest' like zypper, but could be added