Fetch multiple files?

Is there an existing feature request that fetch will be able to fetch multiple files (via a regular file pattern) ?
Something like

fetch src=/tmp/results* dest=/results/ flat=true

ansible-1.2.3-2.el6.noarch on CentOS 6.4

TIA,
Y.

No, this doesn’t exist per se.

I would also like to point out the latest released version of Ansible is 1.3.X, you can get this from epel-testing as it hasn’t hoped into mainstream EPEL just yet, but all testing is complete.

Fedora account holders may wish to +1 the package in the EPEL update system.

So it means recursive copy is not easily possible ? or do we have module for recursive copy ?

~saurabh

You may use shell: rsync, I believe.

Regards,
NM

You can invoke rsync via a “local_action”.

There’s no module for recursive copy. I’ll entertain support for it – it may be something we work on but there’s a long list of other priorities in front.

One of the main challenges of recursive copy is specifying the intermediate directory permissions and SELinux contexts along the way. The app would have to choose a behavior and most likely just figure out what you intended to do, which makes repeated behavior (idempotency) between runs a fun challenge.

It’s definitely doable, but rsync is almost always going to be more efficient.

Tim Appnel is working on a nice wrapper around rsync called “synchronize” to make your playbooks even easier to read and write, and that should be available in the development branch soon.

Awesome :slight_smile:

rsync wrapper! Sweet.