Hello,
I just found out that "file" module's "mode" param accepts only octal
value. That comes as a little surprise, as
http://docs.ansible.com/file_module.html described "mode" as "mode the
file or directory should be, such as 0644 as would be fed to chmod". I
can feed "g+w" to chmod, so I kinda expected being able to use it with
Ansible either.
Anyway, how can I set just some, not all, permission bits of a
recursive directory hierarchy? The culprit is "x" permission, which
means completely different things for file vs dir. So, if I use 0775,
all files will become executable. And if I use 0664, all directories
would become non-searchable.
To remind, chmod, besides constructs like "g+w" to set just "w" bit for
groups, has another device to deal with the issue above -
"X" (capital), which will set "x" bit only for dirs.
Thanks,
Paul mailto:
pmi...@gmail.com