title: ansible shell task erroring out without proper message
body: <p>Team, </p>
  
  <p>I am trying to verify if sdd exists in mount command output. so when there is any, i am fine but when there is none, my task is simply failing instead of just telling me that no mounts exists. any hint how to tackle this? I don't want my task to fail but to report what is the state.</p>
  
  <p>when status code is 0 am good but when status code is 1 am just seeing failure instead of a helpful message that mounds sdd don't exist. </p>
  
  <pre><code> "mount | grep sdd"
  </code></pre>
  
  <pre><code>      - name: "Verify LVP Mounts sdd exists on CPU Nodes for mount_device"
          shell: "mount | grep sdd"
          register: lvp_mount
          ignore_errors: yes
          failed_when: False
          delegate_to: "{{ item }}"
          with_items: "{{ groups['kube-cpu-node'] }}"
        - name: "Report status of mounts"
          fail:
            msg: |
              Mounts sdd not found
              Output of `mount | grep sdd`:
              {{ lvp_mount.stdout }}
              {{ lvp_mount.stderr }}
          when: lvp_mount | failed
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>fatal: [localhost]: FAILED! =&gt; {"msg": "The conditional check 'lvp_mount | failed' failed. The error was: template error while templating string: no filter named 'failed'. String: {% if lvp_mount | failed %} True {% else %} False {% endif %}\n\nThe error appears to be in '/k8s/baremetal/roles/maglev-services-pre-install-checks/tasks/main.yml': line 111, column 9, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n        with_items: \"{{ groups['kube-cpu-node'] }}\"\n      - name: \"Report status of mounts\"\n        ^ here\n"}
  </code></pre>
  
  <p>expected output:</p>
  
  <pre><code>if lvp_mount.rc == 0
  msg: mount sdd exists
  
  if lvp_mount.rc == 1
  msg: mount sdd does not exists
  
  if lvp_mount.rc not in [0, 1]
  msg: mount exec errir
  </code></pre>