title: If else in ansible print statement
body: <p>I would like some help with syntax for a print statment that has multiple conditions. Currently, the quotes for <code>'{{inventory_hostname}}'</code> is causing errors and if I remove the quotes the playbook runs but lists the text inventory_hostname instead of the variable. I would like know how I can get the variable to print and also if the syntax in the if else statement is good.</p>
  
  <pre><code>- debug:
      msg: "{{ 'LTE status on '{{inventory_hostname}}'  is good to go!' if output.stdout | join('') is search('Selected = LTE') else  'LTE status on '{{inventory_hostname}}'  is not operational!' }}"
  </code></pre>