That was quick, eh?
usage:
ansible <pattern> -m file -a "name=/tmp/blarg mode=622 owner=mdehaan
group=mdehaan state=file"
The default for state is file
Other valid states are 'directory' (if not exists, will do mkdir -p
equivalent), and 'absent' (which unlinks symlinks or files
and does recursive directory removals).
The module will return info about files so if you don't pass in
owner/group/mode it's useful for doing basic queries about
things.
EX:
ansible <pattern> -m file -a "name=/tmp/blarg"
That will tell you all about /tmp/blarg
Things not done yet, which I'll file RFEs for to be fixed in short order:
support for SELinux context
return the file size
return the md5sum
I'm updating the module documentation to explain how it works soon, as
well as wiring it in "magically" so all these options are available to
"copy" and "template" for free.
Please help test.
THANKS!