title: how to use lookup('file') in ansible when the file might not exist?
body: <p>I want to lookup the contents of a file on the ansible control node -- </p>
  
  <p>example:</p>
  
  <pre><code>- hosts: all
    vars:
      somevar: "{{ lookup('file', playbook_dir + '/some/path' + inventory_hostname) }}"
  </code></pre>
  
  <p>if the file does not exist I'd like the variable to be undefined or set to a default value.  The lookup module throws an error however if the file doesn't exist.  What's the right way to handle this error so that I can branch on the existence of somevar within my code?</p>