title: Copy folder content with Ansible
body: <p>For some weird reasons I'm having troubles with a simple task which is copying a content of the folder <code>myfiles</code> (few files in there) to the <code>dist/myfiles</code> location. Task looks like this: </p>
  
  <pre><code>name: Deploy config files like there is no tomorrow
  copy:
    src: "{{ item }}"
    dest: "/home/{{ ansible_user_id }}/dist/{{ item }}"
  with_items:
    - 'config'
    - 'myfiles/'
  </code></pre>
  
  <p><code>myfiles</code> folder exist under the <code>dist</code> and <code>config</code> file is copied to the <code>dist</code> folder.</p>
  
  <p>Is this possible in Ansible or I should copy each file separately? Am I doing it completely wrong? </p>