title: How to create an empty file with Ansible?
body: <p>What is the easiest way to create an empty file using Ansible? I know I can save an empty file into the <code>files</code> directory and then copy it to the remote host, but I find that somewhat unsatisfactory.</p>
  
  <p>Another way is to touch a file on the remote host:</p>
  
  <pre><code>- name: create fake 'nologin' shell
    file: path=/etc/nologin state=touch owner=root group=sys mode=0555
  </code></pre>
  
  <p>But then the file gets touched every time, showing up as a yellow line in the log, which is also unsatisfactory...</p>
  
  <p>Is there any better solution to this simple problem?</p>