From 3e80f9caf46e0e314ee60a0bef0701ba23ed952c Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 31 Oct 2017 17:25:29 -0400 Subject: [PATCH] luseradd defaults to creating w/o need for -m (#32411) and -M is incorrect in this case --- lib/ansible/modules/system/user.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/ansible/modules/system/user.py b/lib/ansible/modules/system/user.py index 0fc11ea1de..7f13e478d8 100644 --- a/lib/ansible/modules/system/user.py +++ b/lib/ansible/modules/system/user.py @@ -396,9 +396,7 @@ class User(object): cmd.append(self.password) if self.create_home: - if self.local: - cmd.append('-M') - else: + if not self.local: cmd.append('-m') if self.skeleton is not None: