Make modify_user_usermod honor check mode on AIX.
This commit is contained in:
parent
6ff4c4cb71
commit
2645113eda
1 changed files with 3 additions and 1 deletions
|
@ -1869,13 +1869,15 @@ class AIX(User):
|
||||||
if len(cmd) == 1:
|
if len(cmd) == 1:
|
||||||
(rc, out, err) = (None, '', '')
|
(rc, out, err) = (None, '', '')
|
||||||
elif self.module.check_mode:
|
elif self.module.check_mode:
|
||||||
return (True, '', '')
|
return (0, '', '')
|
||||||
else:
|
else:
|
||||||
cmd.append(self.name)
|
cmd.append(self.name)
|
||||||
(rc, out, err) = self.execute_command(cmd)
|
(rc, out, err) = self.execute_command(cmd)
|
||||||
|
|
||||||
# set password with chpasswd
|
# set password with chpasswd
|
||||||
if self.update_password == 'always' and self.password is not None and info[1] != self.password:
|
if self.update_password == 'always' and self.password is not None and info[1] != self.password:
|
||||||
|
if self.module.check_mode:
|
||||||
|
return (0, '', '')
|
||||||
cmd = []
|
cmd = []
|
||||||
cmd.append(self.module.get_bin_path('chpasswd', True))
|
cmd.append(self.module.get_bin_path('chpasswd', True))
|
||||||
cmd.append('-e')
|
cmd.append('-e')
|
||||||
|
|
Loading…
Reference in a new issue