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