|
|
@ -44,6 +44,7 @@ options:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Darwin/OS X only, optionally hide the user from the login window and system preferences.
|
|
|
|
- Darwin/OS X only, optionally hide the user from the login window and system preferences.
|
|
|
|
- The default will be 'True' if the I(system) option is used.
|
|
|
|
- The default will be 'True' if the I(system) option is used.
|
|
|
|
|
|
|
|
version_added: "2.6"
|
|
|
|
non_unique:
|
|
|
|
non_unique:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Optionally when used with the -u option, this option allows to
|
|
|
|
- Optionally when used with the -u option, this option allows to
|
|
|
@ -271,7 +272,7 @@ class User(object):
|
|
|
|
self.state = module.params['state']
|
|
|
|
self.state = module.params['state']
|
|
|
|
self.name = module.params['name']
|
|
|
|
self.name = module.params['name']
|
|
|
|
self.uid = module.params['uid']
|
|
|
|
self.uid = module.params['uid']
|
|
|
|
self.hidden = module.params['hidden']
|
|
|
|
self.hidden = module.params['hidden']
|
|
|
|
self.non_unique = module.params['non_unique']
|
|
|
|
self.non_unique = module.params['non_unique']
|
|
|
|
self.seuser = module.params['seuser']
|
|
|
|
self.seuser = module.params['seuser']
|
|
|
|
self.group = module.params['group']
|
|
|
|
self.group = module.params['group']
|
|
|
@ -1521,6 +1522,23 @@ class DarwinUser(User):
|
|
|
|
('hidden', 'IsHidden'),
|
|
|
|
('hidden', 'IsHidden'),
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def __init__(self, module):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
super(DarwinUser, self).__init__(module)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# make the user hidden if option is set or deffer to system option
|
|
|
|
|
|
|
|
if self.hidden is None:
|
|
|
|
|
|
|
|
if self.system:
|
|
|
|
|
|
|
|
self.hidden = 1
|
|
|
|
|
|
|
|
elif self.hidden:
|
|
|
|
|
|
|
|
self.hidden = 1
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
self.hidden = 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# add hidden to processing if set
|
|
|
|
|
|
|
|
if self.hidden is not None:
|
|
|
|
|
|
|
|
self.fields.append(('hidden', 'IsHidden'))
|
|
|
|
|
|
|
|
|
|
|
|
def _get_dscl(self):
|
|
|
|
def _get_dscl(self):
|
|
|
|
return [self.module.get_bin_path('dscl', True), self.dscl_directory]
|
|
|
|
return [self.module.get_bin_path('dscl', True), self.dscl_directory]
|
|
|
|
|
|
|
|
|
|
|
|