title: Ansible: exclude item(s) from lookup result
body: <p>The following Ansible play:</p>
  
  <pre><code>- name: Fetch domains
    vars:
      domain_lines: "{{ lookup('file', domain_file).splitlines() }}"
      debug:
        msg: "Domains: {{ domain_lines }}"
  </code></pre>
  
  <p>reads and splits the lines from the following "domain_file":</p>
  
  <pre><code>test1.domain.tld
  # test2.domain.tld
  test3.domain.tld
  test4.domain.tld
  </code></pre>
  
  <p>This works nicely. But now I'd like to skip/remove the lines starting with a hashtag. What's the best way to achieve this?</p>