title: Why is copying a directory with Ansible so slow?
body: <p>I'm using Ansible to copy a directory (900 files, 136MBytes) from one host to another:</p>
  <pre class="lang-yaml prettyprint-override"><code>---
  - name: copy a directory
        copy: src={{some_directory}} dest={{remote_directory}}
  </code></pre>
  <p>This operation takes an incredible 17 minutes, while a simple <code>scp -r &lt;src&gt; &lt;dest&gt;</code> takes a mere 7 seconds.</p>
  <p>I have tried the Accelerated mode, which according to the <a href="http://docs.ansible.com/playbooks_acceleration.html" rel="nofollow noreferrer">ansible docs</a>, but to no avail.</p>
  <blockquote>
  <p>can be anywhere from 2-6x faster than SSH with ControlPersist enabled, and 10x faster than paramiko.</p>
  </blockquote>