From a3798d9b624d9b7aa84adb408d28a0b66b2197ee Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Fri, 13 Apr 2018 22:21:22 +0200 Subject: [PATCH] fix bug in modules/system/user.py (#37552) for freebsd tool "pw" use date not days in "modify_user" (cherry picked from commit d512bed495e3d4993e4f0b51e6f2513d54b2a15e) --- lib/ansible/modules/system/user.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ansible/modules/system/user.py b/lib/ansible/modules/system/user.py index 708850c08d..06cf1ea5a4 100644 --- a/lib/ansible/modules/system/user.py +++ b/lib/ansible/modules/system/user.py @@ -903,9 +903,8 @@ class FreeBsdUser(User): cmd.append(','.join(new_groups)) if self.expires: - days = (time.mktime(self.expires) - time.time()) // 86400 cmd.append('-e') - cmd.append(str(int(days))) + cmd.append(str(int(time.mktime(self.expires)))) # modify the user if cmd will do anything if cmd_len != len(cmd):