community.openwrt.group module – Add or remove groups
Note
This module is part of the community.openwrt collection (version 1.3.0).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install community.openwrt.
To use it in a playbook, specify: community.openwrt.group.
New in community.openwrt 1.2.0
Synopsis
Manage presence of groups on a host.
Note
This module has a corresponding action plugin.
Parameters
Parameter |
Comments |
|---|---|
Whether to delete a group even if it is the primary group of a user. Choices:
|
|
Optional GID to set for the group. |
|
Sets the GID_MAX value for group creation. |
|
Sets the GID_MIN value for group creation. |
|
Name of the group to manage. |
|
This option allows to change the group ID to a non-unique value. Requires Choices:
|
|
Whether the group should be present or not on the remote host. Choices:
|
|
If Choices:
|
Attributes
Attribute |
Support |
Description |
|---|---|---|
Support: full |
Can run in |
|
Support: none |
Returns details on what has changed (or possibly needs changing in |
|
Platform: OpenWrt |
Target platform for this module. |
Examples
- name: Ensure group "somegroup" exists
community.openwrt.group:
name: somegroup
state: present
- name: Ensure group "docker" exists with correct gid
community.openwrt.group:
name: docker
state: present
gid: 1750
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Group name. Returned: always Sample: |
|
Whether the group is present or not. Returned: always Sample: |
|