1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/win_user/tasks/main.yml

35 lines
700 B
YAML
Raw Normal View History

---
- 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