added support for hidden users on macOS
parent
a1c3cd261c
commit
790a117b21
|
@ -38,6 +38,12 @@ options:
|
||||||
uid:
|
uid:
|
||||||
description:
|
description:
|
||||||
- Optionally sets the I(UID) of the user.
|
- Optionally sets the I(UID) of the user.
|
||||||
|
hidden:
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
description:
|
||||||
|
- 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.
|
||||||
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
|
||||||
|
@ -265,6 +271,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.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']
|
||||||
|
@ -1511,6 +1518,7 @@ class DarwinUser(User):
|
||||||
('shell', 'UserShell'),
|
('shell', 'UserShell'),
|
||||||
('uid', 'UniqueID'),
|
('uid', 'UniqueID'),
|
||||||
('group', 'PrimaryGroupID'),
|
('group', 'PrimaryGroupID'),
|
||||||
|
('hidden', 'IsHidden'),
|
||||||
]
|
]
|
||||||
|
|
||||||
def _get_dscl(self):
|
def _get_dscl(self):
|
||||||
|
@ -2134,6 +2142,8 @@ def main():
|
||||||
shell=dict(type='str'),
|
shell=dict(type='str'),
|
||||||
password=dict(type='str', no_log=True),
|
password=dict(type='str', no_log=True),
|
||||||
login_class=dict(type='str'),
|
login_class=dict(type='str'),
|
||||||
|
# following options are specific to macOS
|
||||||
|
hidden=dict(type='bool'),
|
||||||
# following options are specific to selinux
|
# following options are specific to selinux
|
||||||
seuser=dict(type='str'),
|
seuser=dict(type='str'),
|
||||||
# following options are specific to userdel
|
# following options are specific to userdel
|
||||||
|
|
Loading…
Reference in New Issue