title: Check if strings are equals and ternary operator in Ansible
body: <p>In my playbook, I have this:</p>
  <pre><code>#More things
  - include: deploy_new.yml
    vars:
      service_type: &quot;{{ expose_service == 'true' | ternary('NodePort', 'ClusterIP') }}&quot;
      when: service_up|failed
  </code></pre>
  <p>When <code>expose_service</code> is true, I want <code>service_type</code> to be set to <em>NodePort</em>, and <em>ClusterIP</em> otherwise.</p>
  <p>However, <code>service_type</code> is set to <code>False</code> in all cases.</p>
  <p>What am I doing wrong?</p>