I found one (and only one) mention in the documentation that the way to get around errors when a console command results in output is to use the “shell” module and add “& /bin/true” after so that it ignores the output.
The documentation also says we should try use the “command” module whenever possible because it’s more secure. So seems to me that a flag option to ignore output would be useful in “command” and/or “shell” modules no? I’m assuming there is a good reason “command” and “shell” modules error out and stop when there is output even though it’s not an error and even though output is quite common?? Perhaps because there is no way to distinguish between normal output and error output?
It would be nice if these modules had ways of dealing with output more intelligently rather than just always erroring out.
Very hard to find and according to that reference it’s only been available since v1.0. I have installed from RPM and that version is still v0.9. It’s better than nothing though.
Seems to me this would be a very common problem that would have been dealt with in a more core way early on and would have been better documented. Just on my early usage I have found I need to revert to issuing commands and/or shells quite frequently and a lot of the time it results in output which then results in errors which I then need to troubleshoot. Just another thing to deal with that I would not have to if I were doing it all manual. It has certainly slowed me down quite a bit getting my playbooks running properly.
Honestly I was just posting because I was wondering why there is no flag to ignore errors or ignore non-error output from command and shell module. I am not going out of my way to find problems with documentation which was the subject of another thread I started. In this case the documentation problems found me.