Note
This module is part of the community.general collection (version 10.7.3).
You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install community.general. You need further requirements to be able to use this module, see Requirements for details.
To use it in a playbook, specify: community.general.iso_extract.
The below requirements are needed on the host that executes this module.
7zip or p7zip package)Parameter | Comments |
|---|---|
dest path / required | The destination directory to extract files to. |
executable path | The path to the If not provided, it assumes the value |
files list / elements=string / required | A list of files to extract from the image. Extracting directories does not work. |
force boolean | If If Choices:
|
image aliases: path, src path / required | The ISO image to extract files from. |
password string added in community.general 10.1.0 | Password used to decrypt files from the ISO. It is only used if The password is used as a command line argument to 7z. This is a potential security risk that allows passwords to be revealed if someone else can list running processes on the same machine in the right moment. |
Attribute | Support | Description |
|---|---|---|
check_mode | Support: full | Can run in |
diff_mode | Support: none | Will return details on what has changed (or possibly needs changing in |
Note
force=false, only checks the presence of the file.- 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
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/general/iso_extract_module.html