From 10cae0acb32ec8751bc9b7a3c39d90e7c90c5fe7 Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Wed, 15 Jul 2015 12:00:23 +0200 Subject: [PATCH] The tilde expansion doesn't work with user.home --- lib/ansible/modules/system/user.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/modules/system/user.py b/lib/ansible/modules/system/user.py index 29dd6f848ac..b3dd69d08fd 100755 --- a/lib/ansible/modules/system/user.py +++ b/lib/ansible/modules/system/user.py @@ -276,6 +276,9 @@ class User(object): self.update_password = module.params['update_password'] self.expires = None + if module.params['home'] is not None: + self.home = os.path.expanduser(module.params['home']) + if module.params['expires']: try: self.expires = time.gmtime(module.params['expires'])