Expanding the command module: rc_ok, rc_changed, rc_failed?

An issue that seems to come up here and there is that
the command module assumes changed, unless rc!=0,
in which case it assumes failure.

Maybe we could add “rc_changed”, “rc_failed”, and “rc_ok”.
This way the command module could be easily integrated into other playbook logic.

In the case of yum check-update, invocation might look something like:

  • command: yum check-update rc_ok=0 rc_changed=100

This could be extended to comma separated lists of values to support
the wide range of utilities out there.

+1

I think we'll only need rc_failed and rc_changed

Anything that isn't failed is ok.