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

35 lines
879 B
YAML
Raw Normal View History

---
- 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