On 05.09.2016 10:45, Dader Grund wrote:
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 ?
To use copy with wildcard, check out with_fileglob
http://docs.ansible.com/ansible/playbooks_loops.html#id4
--
Kai Stian Olstad
--
You received this message because you are subscribed to the Google Groups "Ansible
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/0031e77bb0ffa3006c6708d0af15796c%40olstad.com.
For more options, visit https://groups.google.com/d/optout.