title: Ansible fail task but continue running
body: <p>I'm currently writing a bunch of checks for Ansible.</p>
  
  <p>It involves contacting remote machines and performing a check.</p>
  
  <p>Based on the result of this check, I make a decision whether it failed or not.</p>
  
  <p>This is the important bit: the task itself never fails. It merely returns a message. I register the result and then analyze it. And based on that I decide if it's a failure or not.</p>
  
  <p>The thing is, I want to add a flag that allows tests to keep running instead of failing.</p>
  
  <p>So the code looks like this:</p>
  
  <pre><code>- name: Check fail.
    fail:
      msg: "Test failed"
    when: "failfast_flag and &lt;the actual check&gt;"
  </code></pre>
  
  <p>The problem there is, if I make failfast_flag <code>false</code>, it doesn't output red anymore.</p>
  
  <p>I want it to continue with the next tests, in that case, but I also want it to color red, indicating it's an error/fail.</p>
  
  <p>How do I accomplish this?</p>
  
  <p>EDIT: Thanks for the suggestions, I'll give them a try in a bit.</p>