4fe08441be
* Warn on tests used as filters * Update docs, add aliases for tests that fit more gramatically with test syntax * Fix rst formatting * Add successful filter, alias of success * Remove renamed_deprecation, it was overkill * Make directory alias for is_dir * Update tests to use proper jinja test syntax * Update additional documentation, living outside of YAML files, to reflect proper jinja test syntax * Add conversion script, porting guide updates, and changelog updates * Update newly added uses of tests as filters * No underscore variable * Convert recent tests as filter changes to win_stat * Fix some changes related to rebasing a few integration tests * Make tests_as_filters_warning explicitly accept the name of the test, instead of inferring the name * Add test for tests_as_filters_warning * Update tests as filters in newly added/modified tests * Address recent changes to several integration tests * Address recent changes in cs_vpc
133 lines
3.5 KiB
YAML
133 lines
3.5 KiB
YAML
---
|
|
- name: fail with invalid section name
|
|
win_security_policy:
|
|
section: This is not a valid section
|
|
key: KeyName
|
|
value: 0
|
|
register: fail_invalid_section
|
|
failed_when: fail_invalid_section.msg != "The section 'This is not a valid section' does not exist in SecEdit.exe output ini"
|
|
|
|
- name: fail with invalid key name
|
|
win_security_policy:
|
|
section: System Access
|
|
key: InvalidKey
|
|
value: 0
|
|
register: fail_invalid_key
|
|
failed_when: fail_invalid_key.msg != "The key 'InvalidKey' in section 'System Access' is not a valid key, cannot set this value"
|
|
|
|
- name: change existing key check
|
|
win_security_policy:
|
|
section: Event Audit
|
|
key: AuditSystemEvents
|
|
value: 1
|
|
register: change_existing_check
|
|
check_mode: yes
|
|
|
|
- name: get actual change existing key check
|
|
test_win_security_policy:
|
|
section: Event Audit
|
|
key: AuditSystemEvents
|
|
register: change_existing_actual_check
|
|
|
|
- name: assert change existing key check
|
|
assert:
|
|
that:
|
|
- change_existing_check is changed
|
|
- change_existing_actual_check.value == 0
|
|
|
|
- name: change existing key
|
|
win_security_policy:
|
|
section: Event Audit
|
|
key: AuditSystemEvents
|
|
value: 1
|
|
register: change_existing
|
|
|
|
- name: get actual change existing key
|
|
test_win_security_policy:
|
|
section: Event Audit
|
|
key: AuditSystemEvents
|
|
register: change_existing_actual
|
|
|
|
- name: assert change existing key
|
|
assert:
|
|
that:
|
|
- change_existing is changed
|
|
- change_existing_actual.value == 1
|
|
|
|
- name: change existing key again
|
|
win_security_policy:
|
|
section: Event Audit
|
|
key: AuditSystemEvents
|
|
value: 1
|
|
register: change_existing_again
|
|
|
|
- name: assert change existing key again
|
|
assert:
|
|
that:
|
|
- change_existing_again is not changed
|
|
- change_existing_again.value == 1
|
|
|
|
- name: change existing key with string type
|
|
win_security_policy:
|
|
section: Event Audit
|
|
key: AuditSystemEvents
|
|
value: "1"
|
|
register: change_existing_key_with_type
|
|
|
|
- name: assert change existing key with string type
|
|
assert:
|
|
that:
|
|
- change_existing_key_with_type is not changed
|
|
- change_existing_key_with_type.value == "1"
|
|
|
|
- name: change existing string key check
|
|
win_security_policy:
|
|
section: System Access
|
|
key: NewGuestName
|
|
value: New Guest
|
|
register: change_existing_string_check
|
|
check_mode: yes
|
|
|
|
- name: get actual change existing string key check
|
|
test_win_security_policy:
|
|
section: System Access
|
|
key: NewGuestName
|
|
register: change_existing_string_actual_check
|
|
|
|
- name: assert change existing string key check
|
|
assert:
|
|
that:
|
|
- change_existing_string_check is changed
|
|
- change_existing_string_actual_check.value == "Guest"
|
|
|
|
- name: change existing string key
|
|
win_security_policy:
|
|
section: System Access
|
|
key: NewGuestName
|
|
value: New Guest
|
|
register: change_existing_string
|
|
|
|
- name: get actual change existing string key
|
|
test_win_security_policy:
|
|
section: System Access
|
|
key: NewGuestName
|
|
register: change_existing_string_actual
|
|
|
|
- name: assert change existing string key
|
|
assert:
|
|
that:
|
|
- change_existing_string is changed
|
|
- change_existing_string_actual.value == "New Guest"
|
|
|
|
- name: change existing string key again
|
|
win_security_policy:
|
|
section: System Access
|
|
key: NewGuestName
|
|
value: New Guest
|
|
register: change_existing_string_again
|
|
|
|
- name: assert change existing string key again
|
|
assert:
|
|
that:
|
|
- change_existing_string_again is not changed
|
|
- change_existing_string_again.value == "New Guest"
|