ansible/test/integration/targets/win_format/tasks/pre_test.yml
Varun Chopra 4651bcf561 Add win_format (#53925)
* Add win_format

* Some doc changes were missed

* Fixes for ansible-test, additional assertion for check mode

* Fix -WhatIf issues

* Support for idempotency and changes to integration tests

* Fix trailing whitespace

* Fixes from review, and added check for non-empty volumes

* Remove an extra line

* Structural changes

* Minor fixes for CI
2019-04-09 06:45:04 +10:00

21 lines
642 B
YAML

---
- set_fact:
AnsibleVhdx: '{{ remote_tmp_dir }}\AnsiblePart.vhdx'
- name: Copy VHDX scripts
win_template:
src: "{{ item.src }}"
dest: '{{ remote_tmp_dir }}\{{ item.dest }}'
loop:
- { src: partition_creation_script.j2, dest: partition_creation_script.txt }
- { src: partition_deletion_script.j2, dest: partition_deletion_script.txt }
- name: Create partition
win_command: diskpart.exe /s {{ remote_tmp_dir }}\partition_creation_script.txt
- name: Run tests
block:
- include: tests.yml
always:
- name: Detach disk
win_command: diskpart.exe /s {{ remote_tmp_dir }}\partition_deletion_script.txt