ansible.builtin.group (v2.5.15) — module

Add or remove groups

| "added in version" 0.0.2 of ansible.builtin"

Authors: Stephen Fromm (@sfromm)

stableinterface | supported by core

Install Ansible via pip

Install with pip install ansible==2.5.15

Description

Manage presence of groups on a host.

For Windows targets, use the M(win_group) module instead.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Ensure group "somegroup" exists
  group:
    name: somegroup
    state: present

Inputs

    
gid:
    description:
    - Optional I(GID) to set for the group.

name:
    description:
    - Name of the group to manage.
    required: true

state:
    choices:
    - absent
    - present
    default: present
    description:
    - Whether the group should be present or not on the remote host.

system:
    default: 'no'
    description:
    - If I(yes), indicates that the group created is a system group.
    type: bool