diff --git a/fail_when.yml b/fail_when.yml index 2b4b790..0b578c1 100644 --- a/fail_when.yml +++ b/fail_when.yml @@ -8,9 +8,9 @@ mode: 0750 - name: execute script - command: /tmp//random.sh + command: /tmp/random.sh register: result - failed_when: result.rc==2 + failed_when: result.stdout == '2' or result.rc==2 - name: display result debug: