community / community.general / 2.5.9 / module / iso_extract Extract files from an ISO image Authors: Jeroen Hoekx (@jhoekx), Matt Robinson (@ribbons), Dag Wieers (@dagwieers)community.general.iso_extract (2.5.9) — module
Install with ansible-galaxy collection install community.general:==2.5.9
collections: - name: community.general version: 2.5.9
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.
- name: Extract kernel and ramdisk from a LiveCD community.general.iso_extract: image: /tmp/rear-test.iso dest: /tmp/virt-rear/ files: - isolinux/kernel - isolinux/initrd.cgz
dest: description: - The destination directory to extract files to. required: true type: path files: description: - A list of files to extract from the image. - Extracting directories does not work. elements: str required: true type: list force: aliases: - thirsty default: true description: - If C(yes), which will replace the remote file when contents are different than the source. - If C(no), the file will only be extracted and copied if the destination does not already exist. - Alias C(thirsty) has been deprecated and will be removed in community.general 3.0.0. type: bool image: aliases: - path - src description: - The ISO image to extract files from. required: true type: path executable: description: - The path to the C(7z) executable to use for extracting files from the ISO. - If not provided, it will assume the value C(7z). type: path