title: How do I copy a remote file onto my local machine using Ansible?
body: <p>I'm using the command module inside my playbook, and it currently looks like this. </p>
  
  <pre><code>- hosts: all
  
    tasks:   
     - name: Update tar file
       command: sudo scp -r username@hostname:/path/from/destination /path/to/destination
  </code></pre>
  
  <p>I've omitted the tasks the take place before this task for the purpose of readability, but what happens when I run this playbook is that it stop at this task. It simply doesn't move forward. I'm sure this is because sudo, so It may want the password for that. I'm not sure how to fix that however.    </p>