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_security_policy/tasks/main.yml
Jordan Borean 8e05d7d962 win_secedit: Added module with tests/diff mode (#26332)
* win_secedit: Added module with tests/diff mode

* fixed up test issues

* Added missing return value

* change for win_secedit based on review

* updated win_security_policy examples for rename
2017-07-14 11:00:29 -07:00

41 lines
995 B
YAML

---
- name: get current entry for audit
test_win_security_policy:
section: Event Audit
key: AuditSystemEvents
register: before_value_audit
- name: get current entry for guest
test_win_security_policy:
section: System Access
key: NewGuestName
register: before_value_guest
- block:
- name: set AuditSystemEvents entry before tests
win_security_policy:
section: Event Audit
key: AuditSystemEvents
value: 0
- name: set NewGuestName entry before tests
win_security_policy:
section: System Access
key: NewGuestName
value: Guest
- name: run tests
include_tasks: tests.yml
always:
- name: reset entries for AuditSystemEvents
win_security_policy:
section: Event Audit
key: AuditSystemEvents
value: "{{before_value_audit.value}}"
- name: reset entries for NewGuestName
win_security_policy:
section: System Access
key: NewGuestName
value: "{{before_value_guest.value}}"