title: Ansible advanced filters ternary
body: <p>Is it possible to achaive somehow equivalent of <code>tenary</code> filter with mix of strings and variables at the same time? I'm thinking of argument substitution.</p>
  
  <p>i.e.</p>
  
  <pre><code>  - name: using custom_fact
      shell: "add enet-connection {{item.0.profile_name}} {{ custom_fact is defined | tenary("Speed={{item.1.ansible_facts.custom_fact_key}}", '')}}"
      with_together:
        - "{{enet}}"
        - "{{custom_fact.results}}"
  </code></pre>