win_disk_image – Manage ISO/VHD/VHDX mounts on Windows hosts¶
Synopsis¶
Manages mount behavior for a specified ISO, VHD, or VHDX image on a Windows host. When
state
ispresent
, the image will be mounted under a system-assigned drive letter, which will be returned in themount_path
value of the module result.Requires Windows 8+ or Windows Server 2012+.
Parameters¶
Examples¶
# Run installer from mounted ISO, then unmount
- name: Ensure an ISO is mounted
win_disk_image:
image_path: C:\install.iso
state: present
register: disk_image_out
- name: Run installer from mounted ISO
win_package:
path: '{{ disk_image_out.mount_paths[0] }}setup\setup.exe'
product_id: 35a4e767-0161-46b0-979f-e61f282fee21
state: present
- name: Unmount ISO
win_disk_image:
image_path: C:\install.iso
state: absent
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Core Team. [core]
Red Hat Support¶
More information about Red Hat’s support of this module is available from this Red Hat Knowledge Base article.
Authors¶
Matt Davis (@nitzmahone)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.