mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
04431216e7
* win_user: use different method to validate credentials that does not rely on SMB/RPC * Use Add-Type as SetLastError on .net reflection not working on 2012 R2
34 lines
700 B
YAML
34 lines
700 B
YAML
---
|
|
- name: create test group that has a network logon denied
|
|
win_group:
|
|
name: win_user-test
|
|
state: present
|
|
|
|
- name: add test group to SeDenyNetworkLogonRight
|
|
win_user_right:
|
|
name: SeDenyNetworkLogonRight
|
|
users:
|
|
- win_user-test
|
|
action: add
|
|
|
|
- block:
|
|
- name: run tests
|
|
include_tasks: tests.yml
|
|
|
|
always:
|
|
- name: remove SeDenyNetworkLogonRight on test group
|
|
win_user_right:
|
|
name: SeDenyNetworkLogonRight
|
|
users:
|
|
- win_user-test
|
|
action: remove
|
|
|
|
- name: remove test group
|
|
win_group:
|
|
name: win_user-test
|
|
state: absent
|
|
|
|
- name: remove the test user
|
|
win_user:
|
|
name: '{{ test_win_user_name }}'
|
|
state: absent
|