New in version 2.3.
Parameter |
Choices/Defaults |
Comments |
---|---|---|
image_path
required |
|
path to an ISO, VHD, or VHDX image on the target Windows host (the file cannot reside on a network share)
|
state
|
|
whether the image should be present as a drive-letter mount or not.
|
# ensure an iso is mounted
- win_disk_image:
image_path: C:\install.iso
state: present
register: disk_image_out
# run installer from mounted iso
- win_package:
path: '{{ disk_image_out.mount_path }}setup\setup.exe'
product_id: '35a4e767-0161-46b0-979f-e61f282fee21'
state: present
# unmount iso
- win_disk_image:
image_path: C:\install.iso
state: absent
Common return values are documented here, the following are the fields unique to this module:
Key |
Returned |
Description |
---|---|---|
mount_path
string
|
when state is present |
filesystem path where the target image is mounted
Sample:
F:\
|
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For more information about Red Hat’s support of this module, please refer to this Knowledge Base article
Hint
If you notice any issues in this documentation you can edit this document to improve it.