ansible.builtin.group – Add or remove groups¶
Note
This module is part of ansible-base
and included in all Ansible
installations. In most cases, you can use the short module name
group even without specifying the collections:
keyword.
Despite that, we recommend you use the FQCN for easy linking to the module
documentation and to avoid conflicting with other collections that may have
the same module name.
New in version 0.0.2: of ansible.builtin
Synopsis¶
Manage presence of groups on a host.
For Windows targets, use the ansible.windows.win_group module instead.
Requirements¶
The below requirements are needed on the host that executes this module.
groupadd
groupdel
groupmod
Parameters¶
See Also¶
See also
- ansible.builtin.user
The official documentation on the ansible.builtin.user module.
- ansible.windows.win_group
The official documentation on the ansible.windows.win_group module.
Examples¶
- name: Ensure group "somegroup" exists
ansible.builtin.group:
name: somegroup
state: present
- name: Ensure group "docker" exists with correct gid
ansible.builtin.group:
name: docker
state: present
gid: 1750
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Stephen Fromm (@sfromm)