Example :
- name: copying only .conf files
copy: src={{ item.0 }} dest={{ item.1 }}
with_together: - [ ‘/file1/foo/.conf’, /file1/foo/.txt’ ]
- [ ‘/etc/boo/’, ‘/etc/goo’ ]
I have a folder with a lot of conf files or other file extension and i need to copy them to different folders on the server.
In Ansible’s docs there only the hint using wildcards in host file. Apparently this doesn’t work in copy module.
Is there any way to use wildcard or regex in this module rather than having to right a module for each file ?