ansible/test/integration/targets/win_initialize_disk/tasks/main.yml
Brant Evans ed54b9b441 add win_initialize_disk module (#58617)
* add win_initialize_disk module

* Add ability to specify disk by path or uniqueid

* Fix documentation

* fix shippable failures

* Update anisble version

* Slight tweaks to the documentation

* Small documentation fixes
2019-12-04 12:37:15 +10:00

28 lines
773 B
YAML

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