I want to loop over a hash list that will provide two items.
- The file glob
- the destination
Is this possible via some sort of nested loop and with_fileglob?
The list would look something like below, and I’m hoping a single ‘copy’ command using with_fileglob can accomplish it. The list in actuality will be several dozen lines long and passed as a parameter so hardcoding it is not that easy.
list_of_items:
- {{ glob: “/path/to/items/*”, dest: “/new/path/to/items/” }}
- {{ glob: “/path/to/moreitems/*”, dest: “/new/path/to/moreitems/” }}
etc