Skip to content

Instantly share code, notes, and snippets.

@jonathanmedd
Created December 2, 2019 16:23
Show Gist options
  • Save jonathanmedd/331f468a0f6049c8ad7b90b354b9e36a to your computer and use it in GitHub Desktop.
Save jonathanmedd/331f468a0f6049c8ad7b90b354b9e36a to your computer and use it in GitHub Desktop.
_10_local_groups
---
- hosts: all
tasks:
- name: Create new local group
win_group:
name: test_users
description: Test Users
state: present
- name: Add a local user and a domain group to the new group
win_group_membership:
name: test_users
members:
- test_user01
- SPRINGFIELD\test_admins
state: present
- name: Ensure only the domain printer_admins group exists in the local Print Operators group
win_group_membership:
name: Print Operators
members:
- SPRINGFIELD\printer_admins
state: pure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment