From 54781bdfe1693f53264a77579781e255d27b9222 Mon Sep 17 00:00:00 2001 From: James Tanner Date: Thu, 17 Oct 2013 13:15:32 -0400 Subject: [PATCH] Fixes #4554 Enumerate user homedir if not passed as an argument --- system/user | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system/user b/system/user index 2e47055b7e9..0528bd5d115 100644 --- a/system/user +++ b/system/user @@ -1513,9 +1513,11 @@ def main(): result['ssh_public_key'] = user.get_ssh_public_key() # handle missing homedirs + info = user.user_info() + if user.home is None: + user.home = info[5] if not os.path.exists(user.home) and user.createhome: if not module.check_mode: - info = user.user_info() user.create_homedir(user.home) user.chown_homedir(info[2], info[3], user.home) result['changed'] = True