I have the below module to download files from source to destination. But now I am trying to set it up in such a way that if a 'directory' path is specified as 'src' instead of 'file', it should download all the files and directories under that path and replicate same on the destination.
Using win_uri with get_content might be a solution, but not sure how it can be done in a recursive way with replicating the same structure.
- name: get files
win_get_url:
url: "https://repo/browse/{{ item.src }}"
dest: "{{ item.dest }}"