mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
773 B
YAML
29 lines
773 B
YAML
5 years ago
|
---
|
||
|
- name: Create the temp directory
|
||
|
win_file:
|
||
|
path: C:\win_initialize_disk_tests
|
||
|
state: directory
|
||
|
|
||
|
- name: Copy VHDX scripts
|
||
|
win_template:
|
||
|
src: "{{ item.src }}"
|
||
|
dest: C:\win_initialize_disk_tests\{{ item.dest }}
|
||
|
loop:
|
||
|
- { src: vhdx_creation_script.j2, dest: vhdx_creation_script.txt }
|
||
|
- { src: vhdx_deletion_script.j2, dest: vhdx_deletion_script.txt }
|
||
|
|
||
|
- name: Create VHD
|
||
|
win_command: diskpart.exe /s C:\win_initialize_disk_tests\vhdx_creation_script.txt
|
||
|
|
||
|
- name: Run tests
|
||
|
block:
|
||
|
- include: tests.yml
|
||
|
always:
|
||
|
- name: Detach disk
|
||
|
win_command: diskpart.exe /s C:\win_initialize_disk_tests\vhdx_deletion_script.txt
|
||
|
|
||
|
- name: Cleanup files
|
||
|
win_file:
|
||
|
path: C:\win_initialize_disk_tests
|
||
|
state: absent
|