How to recursively set directory and file permissions

34 views
Skip to first unread message

Edward Ned Harvey

unread,
Jan 12, 2016, 8:38:05 AM1/12/16
to Ansible Project
If I do this:

file: dest=/foo/bar/somedir owner=root group=apache mode=0775 recurse=yes

It recursively sets the owner, group, and permissions to 0775 on all directories and files in that path. But I want to set directories to 0775, and files to 0644. Is there some way to make ansible do this?

Mischa ter Smitten

unread,
Jan 13, 2016, 3:24:58 AM1/13/16
to Ansible Project
I don't think you can do it in one call.
Reply all
Reply to author
Forward
0 new messages