iso_extract – Extract files from an ISO image¶
Synopsis¶
- This module has two possible ways of operation.
- If 7zip is installed on the system, this module extracts files from an ISO into a temporary directory and copies files to a given destination, if needed.
- If the user has mount-capabilities (CAP_SYS_ADMIN on Linux) this module mounts the ISO image to a temporary location, and copies files to a given destination, if needed.
Requirements¶
The below requirements are needed on the host that executes this module.
- Either 7z (from 7zip or p7zip package)
- Or mount capabilities (root-access, or CAP_SYS_ADMIN capability on Linux)
Parameters¶
Notes¶
Note
- Only the file checksum (content) is taken into account when extracting files from the ISO image. If
force=no
, only checks the presence of the file. - In Ansible 2.3 this module was using
mount
andumount
commands only, requiring root access. This is no longer needed with the introduction of 7zip for extraction.
Examples¶
- name: Extract kernel and ramdisk from a LiveCD
iso_extract:
image: /tmp/rear-test.iso
dest: /tmp/virt-rear/
files:
- isolinux/kernel
- isolinux/initrd.cgz
Status¶
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors¶
- Jeroen Hoekx (@jhoekx)
- Matt Robinson (@ribbons)
- Dag Wieers (@dagwieers)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.