From 642746d0a39bb267bf11fe70dc8cb5277963f8b1 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Wed, 3 Feb 2016 23:19:17 -0800 Subject: [PATCH] Make modify_user_usermod honor check mode on AIX. --- lib/ansible/modules/system/user.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/system/user.py b/lib/ansible/modules/system/user.py index cb003e58a7..e91ab17b85 100755 --- a/lib/ansible/modules/system/user.py +++ b/lib/ansible/modules/system/user.py @@ -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')