A playbook task uses the shell module to run a script that always returns exit code 0, even on failure, but prints 'ERROR' to stdout on failure. How should the task detect failure?
-
A
Set ignore_errors: true and check the output manually
-
B
Use failed_when with a condition checking the registered output for 'ERROR'
-
C
Replace shell with command module which handles exit codes differently
-
D
Use the assert module after the task