title: Copy a file to host machine in Ansible
body: <p>I have to perform the below steps.</p>
  
  <pre><code>     Create a Playbook test.yml.
       This playbook should copy the file (somefile.j2) to the Host machine's folder1, only if 
       somefile.j2 does not exist in host01.
       By using vi editor you can add the tasks to test.yml.
       [Hint: Use the stat and template module].
  </code></pre>
  
  <p>somefile.j2 is present at /root.</p>
  
  <p>An inventory file named "myhosts" is present at /root</p>
  
  <pre><code>    $ cat myhosts
      host01 ansible_ssh_user=root
  </code></pre>
  
  <p>What should be the contents of test.yml?</p>