mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 07:01:22 -07:00
avoid chmod in check mode
This commit is contained in:
parent
8303eadff1
commit
b5c9945485
1 changed files with 1 additions and 1 deletions
|
@ -608,7 +608,7 @@ class User(object):
|
||||||
cmd.append('')
|
cmd.append('')
|
||||||
|
|
||||||
(rc, out, err) = self.execute_command(cmd)
|
(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
|
# If the keys were successfully created, we should be able
|
||||||
# to tweak ownership.
|
# to tweak ownership.
|
||||||
os.chown(ssh_key_file, info[2], info[3])
|
os.chown(ssh_key_file, info[2], info[3])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue