New in version 2.3.
state
is present
, the image will be mounted under a system-assigned drive letter, which will be returned in the mount_path
value of the module result. Requires Windows 8+ or Windows Server 2012+.parameter | required | default | choices | comments |
---|---|---|---|---|
image_path |
yes | path to an ISO, VHD, or VHDX image on the target Windows host (the file cannot reside on a network share) | ||
state |
no | present |
|
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 Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
mount_path | filesystem path where the target image is mounted | when C(state) is C(present) | string | F:\ |
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is maintained by those with core commit privileges
For more information on what this means please read Module Support
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.