Martey, On Thu, 20 Aug 2020 12:34:20 -0700 (PDT) Martey Dodoo <[email protected]> wrote:
> ... the "mode" parameter on the file module to change ownership of
> an existing directory without modifying its permissions. For
> example:
>
> - name: use preserve mode
> file:
> path=/tmp/test
> owner=www-data
> mode=preserve
> state=directory
> become: true
When "state=directory" the parameter mode says "The permissions the
resulting file or directory should have". There is no reason to use
"mode=preserve" if you don't want to change the mode. Simply remove
the line
- name: use preserve mode
file:
path=/tmp/test
owner=www-data
state=directory
become: true
--
Vladimir Botka
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/20200821231437.6e817590%40gmail.com.
pgpSPNaawgVNM.pgp
Description: OpenPGP digital signature
