That option was a recent addition to copy, but was not written into use for any of the other modules, mainly because copy is the only one of the files which does a recursive copy. Synchronize does, but it's using rsync under the hood, which manages the permissions via flags (and synchronize does not use the general file parameters like file/copy/template/etc. do).
Unarchive works similarly, since tar and other archive formats can preserve the user/group/permissions as well. Those modules could be extended to make that parameter override whatever's in the file, but that feature has, until now, not been proposed. You're more than welcome to open a GitHub feature request issue for that functionality. On Thu, Oct 2, 2014 at 9:22 AM, John Oliver <[email protected]> wrote: > Why is that? I can think of a huge array of use cases where I'd want to > set different permissions on files vs. directories that already exist or > are being created from an 'unarchive' action. > > On Wednesday, October 1, 2014 5:33:41 PM UTC-7, James Cammarata wrote: >> >> Also, as far as the directory_mode option goes, the copy module is the >> only one that uses that, so it is not available in the other modules. >> > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/c046ed33-4c4f-4a37-8e34-56978627368d%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/c046ed33-4c4f-4a37-8e34-56978627368d%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAMFyvFhi6Ux-MA5JPpZw4v8s%3DKpqPPHMbxsRALi%3DQQA1uNRVLA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
