title: Copying remotely over ansible with wildcards on windows
body: <p>Actually I'm trying to "install" (just extract and move to my prefered folder) Perl on Windows over ansible.</p>
  
  <p>The package will be copied as tar.gz to the windows system and will be extracted twice, as windows interpretes tar.gz files a bit different (first extract tar.gz to tar file, then extract the tar file).</p>
  
  <p>The source code will be extracted to C:\Perl\perl-5.30.0\ and I want to move the files from there to C:\Perl.</p>
  
  <p>As the files are remote, I'm using "win_copy" module with "remote_src: yes" option.</p>
  
  <p>Files are copying now with:</p>
  
  <pre><code>  - name: Get Perl files for copying on Windows
      win_find:
        paths: '{{ perldir }}\perl-{{ perlversion }}'
      register: perl_move_files
  
    - name: Copy Perl files to main dir on Windows
      win_copy:
        src: '{{ item.path }}'
        dest: '{{ perldir }}\'
        remote_src: yes
      with_items:
        - '{{ perl_move_files.files }}'
  </code></pre>
  
  <p>But ansible is copying only files and not the subdirectories with all files under it. How can I manage this for all files AND subdirectories?</p>
  
  <p>Maybe some experts will read this? </p>
  
  <p>Thanks and regards,
  David</p>