diff --git a/plugins/modules/user.py b/plugins/modules/user.py index 44df326..df41765 100644 --- a/plugins/modules/user.py +++ b/plugins/modules/user.py @@ -110,6 +110,11 @@ - User's shell. - Must be one of the allowed shells from C(/etc/shells). type: str + smb: + description: + - Specifies whether user should have access to SMB shares. + type: bool + default: true ssh_authorized_keys: description: - List of ssh public keys to put in the user's C(.ssh/authorized_keys) @@ -278,7 +283,7 @@ def main(): # x password_disabled(bool) # - locked(bool) # - microsoft_account(bool) - # - smb(bool) - Does user have access to SMB shares? + # x smb(bool) - Does user have access to SMB shares? # x sudo(bool) # x sudo_nopasswd(bool) # x sudo_commands(bool) @@ -321,6 +326,8 @@ def main(): # XXX - remove: delete home directory. builtin.user allows # doing this. + smb=dict(type='bool', default=True), + sudo_commands=dict(type='list', elements='str'), sudo_commands_nopasswd=dict(type='list', @@ -427,6 +434,7 @@ def main(): email = module.params['email'] state = module.params['state'] delete_group = module.params['delete_group'] + smb = module.params['smb'] sudo = module.params['sudo'] \ if 'sudo' in module.params else None sudo_nopasswd = module.params['sudo_nopasswd'] \ @@ -510,6 +518,9 @@ def main(): if uid is not None: arg['uid'] = uid + if smb is not None: + arg['smb'] = smb + if old_sudo_call: # 'old_sudo_call' isn't set to True until we know that # middleware uses the old sudo API. So by the time we @@ -728,6 +739,9 @@ def main(): if shell is not None and user_info['shell'] != shell: arg['shell'] = shell + if smb is not None and user_info['smb'] != smb: + arg['smb'] = smb + if home is not None: # If the username has also changed, need to update the # home directory as well.