New in version 2.4.
A list of members to ensure are present/absent from the group.
Accepts local users as username, .\username, and SERVERNAME\username.
Accepts domain users and groups as DOMAIN\username and [email protected]
Accepts service users as NT AUTHORITY\username.
Name of the local group to manage membership on.
Desired state of the members in the group.
- name: Add a local and domain user to a local group win_group_membership: name: Remote Desktop Users members: - NewLocalAdmin - DOMAIN\TestUser state: present - name: Remove a domain group and service user from a local group win_group_membership: name: Backup Operators members: - DOMAIN\TestGroup - NT AUTHORITY\SYSTEM state: absent
Common return values are documented here Return Values, the following are the fields unique to this module:
A list of all local group members at completion; this is empty if the group contains no members.
A list of members removed when
|success and C(state) is C(absent)||list||['DOMAIN\\TestGroup', 'NT AUTHORITY\\SYSTEM']|
The name of the target local group.
A list of members added when
|success and C(state) is C(present)||list||['NewLocalAdmin', 'DOMAIN\\TestUser']|