title: jinja/ansible convert string to boolean
body: <p>I need the simple thing - if variable is <code>false</code> or empty string, then evaluate to <code>false</code>. Otherwise evaluate to true.</p>
  
  <p>I tried <code>bool(var)</code> but I'm getting:</p>
  
  <pre><code>UndefinedError: 'bool' is undefined
  </code></pre>
  
  <p>Then I tried <code>var | bool</code> but even though var is non-empty, that evaluates to <code>false</code>. How to make that condition work??</p>