From d512bed495e3d4993e4f0b51e6f2513d54b2a15e 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" --- 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 d57bfba0b90..e9074d3142a 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):