ansible / ansible.builtin / v2.6.20 / module / group Add or remove groups | "added in version" 0.0.2 of ansible.builtin" Authors: Stephen Fromm (@sfromm) stableinterface | supported by coreansible.builtin.group (v2.6.20) — module
pip
Install with pip install ansible==2.6.20
Manage presence of groups on a host.
For Windows targets, use the M(win_group) module instead.
- name: Ensure group "somegroup" exists group: name: somegroup state: present
gid: description: - Optional I(GID) to set for the group. name: description: - Name of the group to manage. required: true local: default: 'no' description: - Forces the use of "local" command alternatives on platforms that implement it. This is useful in environments that use centralized authentification when you want to manipulate the local groups. I.E. it uses `lgroupadd` instead of `useradd`. - This requires that these commands exist on the targeted host, otherwise it will be a fatal error. required: false version_added: '2.6' version_added_collection: ansible.builtin 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