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
185 lines
4.7 KiB
YAML
185 lines
4.7 KiB
YAML
# We start with firewall turned off
|
|
|
|
- name: Turn off Windows Firewall again
|
|
win_firewall:
|
|
profiles: [ Domain, Private, Public ]
|
|
state: disabled
|
|
register: firewall_off_again
|
|
|
|
- name: Test firewall_off_again
|
|
assert:
|
|
that:
|
|
- firewall_off_again is not changed
|
|
- not firewall_off_again.Domain.enabled
|
|
- not firewall_off_again.Private.enabled
|
|
- not firewall_off_again.Public.enabled
|
|
|
|
- name: Turn on Windows Firewall on Public
|
|
win_firewall:
|
|
profiles: [ Public ]
|
|
state: enabled
|
|
register: firewall_public_on
|
|
|
|
- name: Test firewall_public_on
|
|
assert:
|
|
that:
|
|
- firewall_public_on is changed
|
|
- not firewall_public_on.Domain.enabled
|
|
- not firewall_public_on.Private.enabled
|
|
- firewall_public_on.Public.enabled
|
|
|
|
|
|
- name: Turn on Windows Firewall on Public again
|
|
win_firewall:
|
|
profiles: [ Public ]
|
|
state: enabled
|
|
register: firewall_public_on_again
|
|
|
|
- name: Test firewall_public_on_again (normal mode)
|
|
assert:
|
|
that:
|
|
- firewall_public_on_again is not changed
|
|
- not firewall_public_on_again.Domain.enabled
|
|
- not firewall_public_on_again.Private.enabled
|
|
- firewall_public_on_again.Public.enabled
|
|
when: not in_check_mode
|
|
|
|
- name: Test firewall_public_on_again (check-mode)
|
|
assert:
|
|
that:
|
|
- firewall_public_on_again is changed
|
|
- not firewall_public_on_again.Domain.enabled
|
|
- not firewall_public_on_again.Private.enabled
|
|
- firewall_public_on_again.Public.enabled
|
|
when: in_check_mode
|
|
|
|
|
|
# On purpose not a list
|
|
- name: Turn on Windows Firewall on Domain
|
|
win_firewall:
|
|
profiles: Domain
|
|
state: enabled
|
|
register: firewall_domain_on
|
|
|
|
- name: Test firewall_domain_on (normal mode)
|
|
assert:
|
|
that:
|
|
- firewall_domain_on is changed
|
|
- firewall_domain_on.Domain.enabled
|
|
- not firewall_domain_on.Private.enabled
|
|
- firewall_domain_on.Public.enabled
|
|
when: not in_check_mode
|
|
|
|
- name: Test firewall_domain_on (check-mode)
|
|
assert:
|
|
that:
|
|
- firewall_domain_on is changed
|
|
- firewall_domain_on.Domain.enabled
|
|
- not firewall_domain_on.Private.enabled
|
|
- not firewall_domain_on.Public.enabled
|
|
when: in_check_mode
|
|
|
|
|
|
- name: Turn on Windows Firewall on Domain again
|
|
win_firewall:
|
|
profiles: [ Domain ]
|
|
state: enabled
|
|
register: firewall_domain_on_again
|
|
|
|
- name: Test firewall_domain_on_again (normal mode)
|
|
assert:
|
|
that:
|
|
- firewall_domain_on_again is not changed
|
|
- firewall_domain_on.Domain.enabled
|
|
- not firewall_domain_on.Private.enabled
|
|
- firewall_domain_on.Public.enabled
|
|
when: not in_check_mode
|
|
|
|
- name: Test firewall_domain_on_again (check-mode)
|
|
assert:
|
|
that:
|
|
- firewall_domain_on_again is changed
|
|
- firewall_domain_on.Domain.enabled
|
|
- not firewall_domain_on.Private.enabled
|
|
- not firewall_domain_on.Public.enabled
|
|
when: in_check_mode
|
|
|
|
|
|
- name: Turn on Windows Firewall
|
|
win_firewall:
|
|
profiles: [ Domain, Private, Public ]
|
|
state: enabled
|
|
register: firewall_on
|
|
|
|
- name: Test firewall_on
|
|
assert:
|
|
that:
|
|
- firewall_on is changed
|
|
- firewall_on.Domain.enabled
|
|
- firewall_on.Private.enabled
|
|
- firewall_on.Public.enabled
|
|
|
|
|
|
# On purpose no profiles added
|
|
- name: Turn on Windows Firewall again
|
|
win_firewall:
|
|
state: enabled
|
|
register: firewall_on_again
|
|
|
|
- name: Test firewall_on_again (normal mode)
|
|
assert:
|
|
that:
|
|
- firewall_on_again is not changed
|
|
- firewall_on_again.Domain.enabled
|
|
- firewall_on_again.Private.enabled
|
|
- firewall_on_again.Public.enabled
|
|
when: not in_check_mode
|
|
|
|
- name: Test firewall_on_again (check-mode)
|
|
assert:
|
|
that:
|
|
- firewall_on_again is changed
|
|
- firewall_on_again.Domain.enabled
|
|
- firewall_on_again.Private.enabled
|
|
- firewall_on_again.Public.enabled
|
|
when: in_check_mode
|
|
|
|
|
|
# On purpose no profiles added
|
|
- name: Turn off Windows Firewall
|
|
win_firewall:
|
|
state: disabled
|
|
register: firewall_off2
|
|
|
|
- name: Test firewall_off2 (normal mode)
|
|
assert:
|
|
that:
|
|
- firewall_off2 is changed
|
|
- not firewall_off2.Domain.enabled
|
|
- not firewall_off2.Private.enabled
|
|
- not firewall_off2.Public.enabled
|
|
when: not in_check_mode
|
|
|
|
- name: Test firewall_off2 (check-mode)
|
|
assert:
|
|
that:
|
|
- firewall_off2 is not changed
|
|
- not firewall_off2.Domain.enabled
|
|
- not firewall_off2.Private.enabled
|
|
- not firewall_off2.Public.enabled
|
|
when: in_check_mode
|
|
|
|
|
|
- name: Turn off Windows Firewall again
|
|
win_firewall:
|
|
profiles: [ Domain, Private, Public ]
|
|
state: disabled
|
|
register: firewall_off2_again
|
|
|
|
- name: Test firewall_off2_again (normal mode)
|
|
assert:
|
|
that:
|
|
- firewall_off2_again is not changed
|
|
- not firewall_off2_again.Domain.enabled
|
|
- not firewall_off2_again.Private.enabled
|
|
- not firewall_off2_again.Public.enabled
|