title: Ansible lookup file variable
body: <p>I'm trying to email a template file that has variable in html such as <code>{{user_name}}</code>, html renders correctly in my mail client, however <code>{{user_name}}</code> doesn't get resolved and displays as string <code>{{user_name}}</code></p>
  
  <pre><code>- name: Send e-mail to a bunch of users, attaching files
    mail:
      host: mail.server.com
      subtype: html
      subject: email template
      body: '{{ lookup("file", "roles/binding/templates/email.j2") }}'
      to: "{{ user_email }}"
  </code></pre>
  
  <p>Example output </p>
  
  <pre><code>Hi {{ user_name }} ....
  </code></pre>
  
  <p>Desired output</p>
  
  <pre><code>Hi John Doe
  </code></pre>
  
  <p>Any ideas on how I can resolve this issue? </p>