From bd321a0af63f85bbb173a04801ac78924d29fdf7 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Fri, 27 Oct 2017 12:16:21 -0400 Subject: [PATCH] adjust nohome param when using luser fixes #32199 --- lib/ansible/modules/system/user.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/system/user.py b/lib/ansible/modules/system/user.py index 96d45173d75..0fc11ea1ded 100644 --- a/lib/ansible/modules/system/user.py +++ b/lib/ansible/modules/system/user.py @@ -396,7 +396,10 @@ class User(object): cmd.append(self.password) if self.create_home: - cmd.append('-m') + if self.local: + cmd.append('-M') + else: + cmd.append('-m') if self.skeleton is not None: cmd.append('-k')