title: How to copy file from localhost to remote host in Ansible playbook?
body: <p>I have a directory:</p>
  
  <pre><code>/users/rolando/myfile
  </code></pre>
  
  <p>I want to copy "myfile" to hostname "targetserver" in directory:</p>
  
  <p><code>/home/rolando/myfile</code></p>
  
  <p>What is the syntax in the playbook to do this? Examples I found with the <code>copy</code> command look like it's more about copying a file from a source directory on a remote server to a target directory on the same remote server.</p>
  
  <p>The line in my playbook .yml I tried that failed:</p>
  
  <pre><code>- copy: 
      src='/users/rolando/myfile' 
      dest='rolando@targetserver:/home/rolando/myfile'
  </code></pre>
  
  <p>What am I doing wrong?</p>