diff --git a/lib/ansible/modules/system/user.py b/lib/ansible/modules/system/user.py index e9074d3142a..1326b7f4b48 100644 --- a/lib/ansible/modules/system/user.py +++ b/lib/ansible/modules/system/user.py @@ -848,12 +848,16 @@ class FreeBsdUser(User): cmd.append('-c') cmd.append(self.comment) - if self.home is not None and info[5] != self.home: - if self.move_home: + if self.home is not None: + if (info[5] != self.home and self.move_home) or (not os.path.exists(self.home) and self.createhome): cmd.append('-m') cmd.append('-d') cmd.append(self.home) + if self.skeleton is not None: + cmd.append('-k') + cmd.append(self.skeleton) + if self.group is not None: if not self.group_exists(self.group): self.module.fail_json(msg="Group %s does not exist" % self.group)