community / community.general / 6.6.8 / module / iso_customize Add/remove/change files in ISO file | "added in version" 5.8.0 of community.general" Authors: Yuhua Zou (@ZouYuhua) <zouy@vmware.com>community.general.iso_customize (6.6.8) — module
Install with ansible-galaxy collection install community.general:==6.6.8
collections: - name: community.general version: 6.6.8
This module is used to add/remove/change files in ISO file.
The file inside ISO will be overwritten if it exists by option I(add_files).
- name: "Customize ISO file" community.general.iso_customize: src_iso: "/path/to/ubuntu-22.04-desktop-amd64.iso" dest_iso: "/path/to/ubuntu-22.04-desktop-amd64-customized.iso" delete_files: - "/boot.catalog" add_files: - src_file: "/path/to/grub.cfg" dest_file: "/boot/grub/grub.cfg" - src_file: "/path/to/ubuntu.seed" dest_file: "/preseed/ubuntu.seed" register: customize_iso_result
src_iso: description: - This is the path of source ISO file. required: true type: path dest_iso: description: - The path of the customized ISO file. required: true type: path add_files: default: [] description: - Allows to add and replace files in the ISO file. - Will create intermediate folders inside the ISO file when they do not exist. elements: dict required: false suboptions: dest_file: description: - The absolute path of the file inside the ISO file. required: true type: str src_file: description: - The path with file name on the machine the module is executed on. required: true type: path type: list delete_files: default: [] description: - Absolute paths for files inside the ISO file that should be removed. elements: str required: false type: list
dest_iso: description: Path of the customized ISO file. returned: on success sample: /path/to/customized.iso type: str src_iso: description: Path of source ISO file. returned: on success sample: /path/to/file.iso type: str