Description of problem:
Via https://bugzilla.redhat.com/show_bug.cgi?id=1501852 we fixed a bunch of issues around puppet errors being ignored by the higher level parts of the stack. As it turns out there are other invocations where we ignore the errors reported. Namely in ansible playbooks like this:
- name: return code
echo "fail 2"
- debug: msg="Broken (does not fail as expected)"
when: outputs is defined
The problem with the above playbooks is that 'failed_when: false' makes it so
that the 'failed' key in the outputs dictionary is set to false and so we do not ever fail correctly. The other problem is that 'outputs is defined' is always true even when the previous task was skipped.
verified as part of controller replacement procedure https://bugzilla.redhat.com/show_bug.cgi?id=1494455
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.