With fileglob throwing error

I am trying to copy files from ansible to remote host with pattern matching
Giving wildcard pattern is not working for copy

copy:
src: “{{ item }}”
dest: /ReleaseMigration
mode: 0600
with_fileglob:

  • “/dql_infashared/Scripts/Deployment/script/*”

Hello Lavanya,

Greetings!

Hope the attached pattern will work for you.

copy:
src: /path-of-the-file (path of the file that’s need to copy)
dest: /path thats need to copy

Regards,
Jayanthreddy

Issue is I need to copy all the files matching the pattern like data* to destination host path

@Lavanya,
Make life easier:

  1. Provide the full path of three files you want moved from the ansible host to the ansible agent.
  2. Provide the full path of the destination.

If nothing else provide them side-by-side for Source path/file → Destination path/file/