978a979566
* win_dsc: improved parameter handling * removed uneeded try/catch leftover from testing * removed undeed return values * added custom DSC to fully test out casting * fix up codestyle issues * using new Requires ps version check * fixed up error message check on earlier ps version
34 lines
879 B
YAML
34 lines
879 B
YAML
---
|
|
- name: get powershell version
|
|
win_shell: $PSVersionTable.PSVersion.Major
|
|
register: powershell_version
|
|
|
|
- name: run smoke tests when we can't run the full suite
|
|
include_tasks: smoke.yml
|
|
when: powershell_version.stdout_lines[0]|int < 5
|
|
|
|
- block:
|
|
- name: run non-destructive tests
|
|
include_tasks: tests.yml
|
|
|
|
- name: run destructive tests if flag is set
|
|
include_tasks: destructive.yml
|
|
when: test_win_dsc_run_desctructive == True
|
|
|
|
always:
|
|
- name: remove test feature
|
|
win_feature:
|
|
name: '{{test_win_dsc_feature_name}}'
|
|
state: absent
|
|
|
|
- name: remove test folder
|
|
win_file:
|
|
path: '{{test_win_dsc_folder}}'
|
|
state: absent
|
|
|
|
- name: remove custom DSC resource folder
|
|
win_file:
|
|
path: C:\Program Files\WindowsPowerShell\Modules\xTestDsc
|
|
state: absent
|
|
|
|
when: powershell_version.stdout_lines[0]|int >= 5
|