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

avoid chmod in check mode

This commit is contained in:
Brian Coca 2016-02-09 21:48:01 -05:00 committed by Matt Clay
parent 8303eadff1
commit b5c9945485

View file

@ -608,7 +608,7 @@ class User(object):
cmd.append('')
(rc, out, err) = self.execute_command(cmd)
if rc == 0:
if rc == 0 and not self.module.check_mode:
# If the keys were successfully created, we should be able
# to tweak ownership.
os.chown(ssh_key_file, info[2], info[3])