mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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
35 lines
1,013 B
YAML
35 lines
1,013 B
YAML
# only basic tests, doesn't actually install/uninstall and hotfixes
|
|
---
|
|
- name: fail when source isn't set
|
|
win_hotfix:
|
|
state: present
|
|
register: fail_no_source
|
|
failed_when: fail_no_source.msg != 'source must be set when state=present'
|
|
|
|
- name: fail when identifier or kb isn't set on absent
|
|
win_hotfix:
|
|
state: absent
|
|
register: fail_no_key
|
|
failed_when: fail_no_key.msg != 'either hotfix_identifier or hotfix_kb needs to be set when state=absent'
|
|
|
|
- name: remove an identifier that isn't installed
|
|
win_hotfix:
|
|
hotfix_identifier: fake~identifier
|
|
state: absent
|
|
register: remove_missing_hotfix_identifier
|
|
|
|
- name: assert remove an identifier that isn't installed
|
|
assert:
|
|
that:
|
|
- remove_missing_hotfix_identifier is not changed
|
|
|
|
- name: remove a kb that isn't installed
|
|
win_hotfix:
|
|
hotfix_kb: KB123456
|
|
state: absent
|
|
register: remove_missing_hotfix_kb
|
|
|
|
- name: assert remove a kb that isn't installed
|
|
assert:
|
|
that:
|
|
- remove_missing_hotfix_kb is not changed
|