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_scheduled_task/tasks/main.yml
Dag Wieers ef36d7de68 win_scheduled_tasks: Improve example test framework (#22833)
Updated as discussed in previous Test Working Group.
2017-03-23 19:42:12 -07:00

21 lines
509 B
YAML

# NOTE: The win_scheduled_task module only works on Win2012+
- name: Test Windows capabilities
raw: Get-Command New-ScheduledTask -ErrorAction SilentlyContinue; return $?
failed_when: no
register: new_scheduledtask
- name: Only run tests when Windows is capable
when: new_scheduledtask.rc == 0
block:
- name: Test in normal mode
include: tests.yml
vars:
in_check_mode: no
- name: Test in check-mode
include: tests.yml
vars:
in_check_mode: yes
check_mode: yes