ansible.builtin.group – Add or remove groups¶
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
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
Manage presence of groups on a host.
For Windows targets, use the ansible.windows.win_group module instead.
The below requirements are needed on the host that executes this module.
- 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
Common return values are documented here, the following are the fields unique to this module: