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