Skip to content

Commit

Permalink
Fixes #20096
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKaerst committed Feb 28, 2018
1 parent 8c2fae2 commit 54619f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/ansible/modules/system/user.py
Expand Up @@ -923,7 +923,10 @@ def modify_user(self):
if self.expires:
days = (time.mktime(self.expires) - time.time()) // 86400
cmd.append('-e')
cmd.append(str(int(days)))
if self.clearexpires < 0:
cmd.append('0')
else:
cmd.append(str(int(days)))

# modify the user if cmd will do anything
if cmd_len != len(cmd):
Expand Down

0 comments on commit 54619f7

Please sign in to comment.