From d906fdeba275377ba54345a610d57275149584f8 Mon Sep 17 00:00:00 2001 From: Andrew Schultz Date: Tue, 10 Dec 2019 08:32:43 -0700 Subject: [PATCH] Document group module return values (#65294) * Document group module return values, based on iterating over the combinations of `state` and `system` with existent and non-existent groups. --- lib/ansible/modules/system/group.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/lib/ansible/modules/system/group.py b/lib/ansible/modules/system/group.py index bad3157dcfd..ac50bc899d3 100644 --- a/lib/ansible/modules/system/group.py +++ b/lib/ansible/modules/system/group.py @@ -74,6 +74,29 @@ EXAMPLES = ''' state: present ''' +RETURN = r''' +gid: + description: Group ID of the group. + returned: When C(state) is 'present' + type: int + sample: 1001 +name: + description: Group name + returned: always + type: str + sample: users +state: + description: Whether the group is present or not + returned: always + type: str + sample: 'absent' +system: + description: Whether the group is a system group or not + returned: When C(state) is 'present' + type: bool + sample: False +''' + import grp from ansible.module_utils._text import to_bytes