22.27.37. salt.states.group

22.27.37.1. 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.

Docs for previous releases are available on salt.rtfd.org.

Latest Salt release: 2014.1.13

Try the shiny new release candidate of Salt, v2014.7.0rc6! More info here.

Table Of Contents

Previous topic

22.27.36. salt.states.grains

Next topic

22.27.38. salt.states.hg

SaltStack News

Upcoming SaltStack events, webinars and local meet ups and user groups.