ansible/ansible — pull request #2816 by chamill (2013-04-30 14:48:01+00:00)
Title: Accept symbolic permissions for file argument mode

Allow syntax like 'u=rwx,g=rw' for the common file argument 'mode', as
per 'chmod' Unix command.

Note that, unlike 'chmod', each listed mode must specify 'u', 'g', 'o',
or 'a' for its target, in order to avoid having to replicate the
behavior of 'chmod +x', for example, which will add execute permissions
only to bits not masked out by the current process's umask.

Mostly, I wanted to be able to use the 'X' permission when setting file
permissions, which sets to execute attribute on a file only if it is a directory or already has the execute bit set for users, group, or other.

Suggestions for improvement are very welcome; it's all a bit ugly (and long).