|
|
|
@ -28,6 +28,7 @@ options:
|
|
|
|
comment:
|
|
|
|
comment:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Optionally sets the description (aka I(GECOS)) of user account.
|
|
|
|
- Optionally sets the description (aka I(GECOS)) of user account.
|
|
|
|
|
|
|
|
- On macOS, this defaults to the O(name) option.
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
hidden:
|
|
|
|
hidden:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
@ -49,6 +50,7 @@ options:
|
|
|
|
group:
|
|
|
|
group:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Optionally sets the user's primary group (takes a group name).
|
|
|
|
- Optionally sets the user's primary group (takes a group name).
|
|
|
|
|
|
|
|
- On macOS, this defaults to V('staff')
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
groups:
|
|
|
|
groups:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
@ -2512,6 +2514,14 @@ class DarwinUser(User):
|
|
|
|
if rc != 0:
|
|
|
|
if rc != 0:
|
|
|
|
self.module.fail_json(msg='Cannot create user "%s".' % self.name, err=err, out=out, rc=rc)
|
|
|
|
self.module.fail_json(msg='Cannot create user "%s".' % self.name, err=err, out=out, rc=rc)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Make the Gecos (alias display name) default to username
|
|
|
|
|
|
|
|
if self.comment is None:
|
|
|
|
|
|
|
|
self.comment = self.name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Make user group default to 'staff'
|
|
|
|
|
|
|
|
if self.group is None:
|
|
|
|
|
|
|
|
self.group = 'staff'
|
|
|
|
|
|
|
|
|
|
|
|
self._make_group_numerical()
|
|
|
|
self._make_group_numerical()
|
|
|
|
if self.uid is None:
|
|
|
|
if self.uid is None:
|
|
|
|
self.uid = str(self._get_next_uid(self.system))
|
|
|
|
self.uid = str(self._get_next_uid(self.system))
|
|
|
|
|