ansible/test/integration/targets/win_hotfix/tasks/tests.yml
Jordan Borean 5fbbf0e75a win_hotfix: new module to install Windows hotfixes (#27260)
* win_hotfix: new module to install Windows hotfixes

* revert to older module util loader style to satisfy the checks for now

* Changes from PR

* changed the test hotfix so we can run tests in shippable
2017-08-11 07:57:07 +10:00

35 lines
1,007 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:
- not remove_missing_hotfix_identifier|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:
- not remove_missing_hotfix_kb|changed