title: AnsibleError: template error while templating string: expected token 'end of print statement', got '{'
body: <p>The following is a task, which is throwing me an error because jinja2 templating doesnt support this.</p>
  <pre class="lang-yaml prettyprint-override"><code>- name: Print the ip address
    debug:
      msg: &quot;{{ ansible_{{ item }}['ipv4']['address'] }}&quot;
    with_items: &quot;{{ ansible_interfaces|reject('search', 'lo')|list|sort }}&quot;
  </code></pre>
  <p>The error thrown is:</p>
  <blockquote>
  <p>&quot;msg&quot;: &quot;template error while templating string: expected token 'end of print statement', got '{'. String: {{ ansible_{{ item }}['ipv4']['address'] }}&quot;</p>
  </blockquote>
  <p>Any pointers on how to solve this issue?</p>