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

Make modify_user_usermod honor check mode on AIX.

This commit is contained in:
Matt Clay 2016-02-03 23:19:17 -08:00
parent c690b318da
commit 642746d0a3

View file

@ -1880,13 +1880,15 @@ class AIX(User):
if len(cmd) == 1:
(rc, out, err) = (None, '', '')
elif self.module.check_mode:
return (True, '', '')
return (0, '', '')
else:
cmd.append(self.name)
(rc, out, err) = self.execute_command(cmd)
# set password with chpasswd
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.append(self.module.get_bin_path('chpasswd', True))
cmd.append('-e')