W3cubDocs

/Ansible

group - Add or remove groups

Synopsis

Manage presence of groups on a host.

Requirements (on host that executes module)

  • groupadd
  • groupdel
  • groupmod

Options

parameter required default choices comments
gid
no
Optional GID to set for the group.
name
yes
Name of the group to manage.
state
no present
  • present
  • absent
Whether the group should be present or not on the remote host.
system
no no
  • yes
  • no
If yes, indicates that the group created is a system group.

Examples

# Example group command from Ansible Playbooks
- group: name=somegroup state=present

This is a Core Module

For more information on what this means please read Core Modules

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, developing_test_pr and Developing Modules.

© 2012–2016 Michael DeHaan
© 2016 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/group_module.html