salt.states.group

Management of user groups

The group module is used to create and manage unix group settings, groups can be either present or absent:

cheese:
  group.present:
    - gid: 7648
    - system: True
    - addusers:
      - user1
      - users2
    - delusers:
      - foo

cheese:
  group.present:
    - gid: 7648
    - system: True
    - members:
      - foo
      - bar
      - user1
      - user2
salt.states.group.absent(name)

Ensure that the named group is absent

name
The name of the group to remove
salt.states.group.present(name, gid=None, system=False, addusers=None, delusers=None, members=None)

Ensure that a group is present

name
The name of the group to manage
gid
The group id to assign to the named group; if left empty, then the next available group id will be assigned
system
Whether or not the named group is a system group. This is essentially the '-r' option of 'groupadd'.
addusers
List of additional users to be added as a group members.
delusers
Ensure these user are removed from the group membership.
members
Replace existing group members with a list of new members.
Note: Options 'members' and 'addusers/delusers' are mutually exclusive and
can not be used together.