ansible/test/integration/targets/win_data_deduplication/tasks/pre_test.yml
rnsc cfb6cb4cef Win data deduplication module (#59723)
* win_data_deduplication initial commit

* Ansible version added bump

* integration tests

* missing aliases

* Fixing documentation

* license and metadata

* documentation formating

* removing win_format ref

* documentation fixes

* trailing whitespace

* Fixing more documentation :(

* missing return

* documentation cleanup

* align copyright with doc

* indentation fixes...

* updated examples

* ignore meta and future for python doc

* removing when

* use Get-PSVolume

* Get-Volume not PSVolume

* missing updated var

* updated old drive refs

* make sure that the T drive is formated as NTFS

* path and drive_letter are exclusive

* idempotence test fix

* changing task order + reboot timeout

* implementing the requested changes to the code

* updating documentation to reflect code changes

* simplifying tests

* missing feature install before running the tasks

* pslint trailing whitespace

* putting old tests back

* missing win_format

* skip windows 2012

* Fixing message for OS check

* pass settings and dedup_job variables

* Removing unnecessary module

* logic issue

* replacing tabs with double space

* documentation fix + removing tabs

* Update documentation with recent changes

* Apply changes requested

* switch feature install with partition format

* replace tabs with spaces

* trailing whitespace

* we don't need those ignores anymore

* minor fixes

* updated test to match latest code changes

* removing dedup job task

* adding check mode yes test

* fixes for check_mode support

* updating examples in documentation

* wrong indentation for check_mode in tests

* convert indentation to spaces

* -not $check_mode

* removing unneeded spec in documentation

* Switch to Ansible.Basic

* 2.9 is already gone, so let's add this module to 2.10...

* removing useless else condition

* updated documentation

* fixing specs and removing useless try/catch + fix exit/fail

* spaces indentation

* $null check is actually needed if volume never had dedup

* Missing check_mode update

* removing required for default state in documentation

* converted tabs to spaces
2019-12-04 14:21:21 +10:00

40 lines
1.1 KiB
YAML

---
- set_fact:
AnsibleVhdx: '{{ remote_tmp_dir }}\AnsiblePart.vhdx'
- name: Install FS-Data-Deduplication
win_feature:
name: FS-Data-Deduplication
include_sub_features: true
state: present
register: data_dedup_feat_reg
- name: Reboot windows after the feature has been installed
win_reboot:
reboot_timeout: 3600
when:
- data_dedup_feat_reg.success
- data_dedup_feat_reg.reboot_required
- 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: Format T with NTFS
win_format:
drive_letter: T
file_system: ntfs
- name: Run tests
block:
- include: tests.yml
always:
- name: Detach disk
win_command: diskpart.exe /s {{ remote_tmp_dir }}\partition_deletion_script.txt