group - Add or remove groups

Synopsis

  • Manage presence of groups on a host.
  • For Windows targets, use the win_group module instead.

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

Notes

Note

  • For Windows targets, use the win_group module instead.

Status

This module is flagged as stableinterface which means that the maintainers for this module guarantee that no backward incompatible interface changes will be made.

Maintenance Info

For more information about Red Hat’s this support of this module, please refer to this knowledge base article<https://access.redhat.com/articles/rhel-top-support-policies>

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

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