Ansible: Changing permissions of files inside a directory in .yml file


Suppose there’s a directory /dir/tools.
tools contains a bunch of scripts, say,,,

I need to set the permissions of,, and to 0775.

I’ve currently done it in the following manner:

Btw, ‘file: path=/dir/tools owner=abc group=abc mode=0775’ sets the permission of tools directory but not of the files inside it.

Is there a better way of achieving this?



Leave a Reply