title: ansible to copy file and folders if md5 and size of file differs
body: <p>I want to copy files and subfolders from a directory I wrote the following yml but its throwing error on my mac</p>
  <pre><code>---
  - hosts: source_server
    gather_facts: false
    tasks:
      - name: copy file from source server to local
        fetch:
          src: /home/user/Test/
          dest: /Users/user/Log/rules/
  
        run_once: true
  
  - hosts: dest_servers
    tasks:
      - name: copy files
        copy:
          src: /Users/user/Log/rules/
          dest: /home/user/Test/
          remote_src: yes
          directory_mode: yes
  </code></pre>
  <p>[Errno 21] Is a directory: '/home/user/Test/'\r\n&quot;,
  &quot;msg&quot;: &quot;MODULE FAILURE\nSee stdout/stderr for the exact error&quot;,
  &quot;rc&quot;: 1
  }</p>
  <p>Any idea what I am doing wrong?</p>