ansible/test/integration/targets/win_user/tasks/main.yml
Jordan Borean 04431216e7
win_user: use different method to validate credentials that does not rely on SMB/RPC (#43059)
* 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
2018-07-24 08:16:42 +10:00

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