ansible/ansible — pull request #4072 by hnakamur (2013-09-09 22:13:57+00:00)
Title: Add ok_rc module varirable. If rc is in ok_rc, then accept it is not an error.

Currently we can use ignore_errors, but we get a red failed log followed by the ignored message.
This is not so nice to our eyes.

Some commands like grep -q returns 0 or 1 as exit codes and we don't want to be treated to be an error,
especially when we run it to query the status.

Now I use a workaround like:

```
shell: grep -q foo bar; echo $?
register: result
```

And then at another task I use ```when: result.stdout == '0'```.
But it is not good because we cannot treat codes other than 0 and 1 as errors.

So here is a pull request to add a ```ok_rc``` module variable, inspired by [ok_ret_codes in Fabric](http://docs.fabfile.org/en/1.7/usage/env.html#ok_ret_codes)