Manage groups on Windows
Important
If you feel that Salt should be using this module to manage groups on a minion, and it is using a different module (or gives an error similar to 'group.info' is not available), see here.
Add the specified group
name (str) -- The name of the group to add
True
if successful, otherwise False
CLI Example:
salt '*' group.add foo
Add a user to a group
True
if successful, otherwise False
CLI Example:
salt '*' group.adduser foo username
Remove the named group
name (str) -- The name of the group to remove
True
if successful, otherwise False
CLI Example:
salt '*' group.delete foo
Remove a user from a group
True
if successful, otherwise False
CLI Example:
salt '*' group.deluser foo username
Return info on all groups
refresh (bool) -- Refresh the info for all groups in __context__
. If False only
the groups in __context__
will be returned. If True the
__context__
will be refreshed with current data and returned.
Default is False
A list of groups and their information
CLI Example:
salt '*' group.getent
Return information about a group
name (str) -- The name of the group for which to get information
A dictionary of information about the group
CLI Example:
salt '*' group.info foo
Return a list of groups
refresh (bool) -- Refresh the info for all groups in __context__
. If False only
the groups in __context__
will be returned. If True, the
__context__
will be refreshed with current data and returned.
Default is False
A list of groups on the machine
CLI Example:
salt '*' group.list_groups
Ensure a group contains only the members in the list
True
if successful, otherwise False
CLI Example:
salt '*' group.members foo 'user1,user2,user3'