avoid chmod in check mode
This commit is contained in:
parent
e6460906fd
commit
3d4b5d165c
1 changed files with 1 additions and 1 deletions
|
@ -609,7 +609,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])
|
||||
|
|
Loading…
Reference in a new issue