mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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
|