mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
90c3337316
* 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
28 lines
743 B
YAML
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
|