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_dsc/tasks/main.yml
Jordan Borean 978a979566
win_dsc: improved parameter handling ()
* 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
2017-11-06 09:44:04 +10:00

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