ansible/test/integration/targets/win_partition/tasks/main.yml
Varun Chopra 90c3337316 Add win_partition (#46292)
* Added win_partition module

* Fixes sanity tests

* Requested changes minus changes in partition_size

* Removed trailing whitespace and fixed docstring

* Changes to parititon_size to allow variable units

* Stricter regex for partition_size
2018-11-26 11:01:59 +10:00

28 lines
743 B
YAML

---
- name: Create the temp directory
win_file:
path: C:\win_partition_tests
state: directory
- name: Copy VHDX scripts
win_template:
src: "{{ item.src }}"
dest: C:\win_partition_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_partition_tests\vhdx_creation_script.txt
- name: Run tests
block:
- include: tests.yml
always:
- name: Detach disk
win_command: diskpart.exe /s C:\win_partition_tests\vhdx_deletion_script.txt
- name: Cleanup files
win_file:
path: C:\win_partition_tests
state: absent