Thanks, Michael. It looks like with_fileglob() only shows files, not
directories, so that wouldn't work for me.
I'm testing a workaround using find or ls, then split() to grab b,
c, and d. It would be nice to pass b and c as arguments to a task
using the synchronize module.
On Wednesday, July
I wouldn't shell out.
I'd call python's very handy os.path.walk with a custom function. If you'd
like to talk about this, ansible-devel is probably a bit more on topic (and
I'm trying to spur that list into greater life).
On Thu, Jul 24, 2014 at 10:05 AM, Bill Lubanovic b...@madscheme.com
I'd like to walk a directory hierarchy of the form a/b/c/d. a is
a fixed root directory, and isn't relevant. I have a number of b
directories, which represent machine categories. Under each b are zero or
more c directories, which are string values for that category. Finally,
d is a directory
So there's already with_fileglob in Ansible
- debug: msg={{ path }}
with_fileglob: /path/to/files/*/*.tgz
This isn't recursive however, despite being able to specify multiple
directories to read.
It would be possible to make a lookup plugin that was, like a
with_fileglob_recursive that used