mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00: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:
committed by
Michael Scherer
parent
1b92e43dcb
commit
795b711394
@@ -328,7 +328,7 @@ def keyfile(module, user, write=False, path=None, manage_dir=True, follow=False)
|
||||
if follow:
|
||||
keysfile = os.path.realpath(keysfile)
|
||||
|
||||
if not write:
|
||||
if not write or module.check_mode:
|
||||
return keysfile
|
||||
|
||||
uid = user_entry.pw_uid
|
||||
|
||||
Reference in New Issue
Block a user