1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Do not reset permissions in checkmode

If using authorized_key on a directory with non standard permissions,
using checkmode will reset the permission silently.
This commit is contained in:
Michael Scherer 2018-09-15 15:41:00 +02:00 committed by Michael Scherer
parent 1b92e43dcb
commit 795b711394

View file

@ -328,7 +328,7 @@ def keyfile(module, user, write=False, path=None, manage_dir=True, follow=False)
if follow: if follow:
keysfile = os.path.realpath(keysfile) keysfile = os.path.realpath(keysfile)
if not write: if not write or module.check_mode:
return keysfile return keysfile
uid = user_entry.pw_uid uid = user_entry.pw_uid