mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Add any groups that are passed in as options
This commit is contained in:
parent
7647993c9e
commit
3c6cec6dfd
@ -51,6 +51,9 @@ def add(name,
|
||||
salt '*' user.add name password
|
||||
'''
|
||||
ret = __salt__['cmd.run_all']('net user {0} /add'.format(name))
|
||||
if groups:
|
||||
for group in groups:
|
||||
__salt__['user.addgroup'](name, group)
|
||||
return ret['retcode'] == 0
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user