saltstack/salt — pull request #12981 by bemehow (2014-05-22 21:25:21+00:00)
Title: disable confusing [ERROR] printing on retcode!=0 where not relevant

This is a small addition to make the output look clearer.

```
[ERROR ] Command '/sbin/service nrpe status' failed with return code: 3
[ERROR ] output: nrpe is stopped
[ERROR ] Command '/sbin/service xinetd status' failed with return code: 3
[ERROR ] output: xinetd is stopped
[ERROR ] Command '/sbin/service haproxy status' failed with return code: 3
[ERROR ] output: haproxy is stopped
```

on the ```service.status nrpe``` it will give:

```
[INFO ] Executing command '/sbin/service nrpe status' in directory '/root'
[INFO ] output: nrpe is stopped
local:
False
```

vs
```
[INFO ] Executing command '/sbin/service nrpe status' in directory '/root'
[ERROR ] Command '/sbin/service nrpe status' failed with return code: 3
[ERROR ] output: nrpe is stopped
local:
False
```

it also affects ```service.enable``` making it easier to read where the error is.
```
[INFO ] Executing command '/sbin/chkconfig --list haproxya' in directory '/root'
[INFO ] output: error reading information on service haproxya: No such file or directory
[INFO ] Executing command '/sbin/chkconfig --add haproxya' in directory '/root'
[ERROR ] Command '/sbin/chkconfig --add haproxya' failed with return code: 1
[ERROR ] output: error reading information on service haproxya: No such file or directory
[ERROR ] Unable to add initscript "haproxya" to chkconfig
local:
False
```

vs

```
[INFO ] Executing command '/sbin/chkconfig --list haproxya' in directory '/root'
[ERROR ] Command '/sbin/chkconfig --list haproxya' failed with return code: 1
[ERROR ] output: error reading information on service haproxya: No such file or directory
[INFO ] Executing command '/sbin/chkconfig --add haproxya' in directory '/root'
[ERROR ] Command '/sbin/chkconfig --add haproxya' failed with return code: 1
[ERROR ] output: error reading information on service haproxya: No such file or directory
[ERROR ] Unable to add initscript "haproxya" to chkconfig
local:
False
```