community.general.iso_create – Generate ISO file with specified files or folders
Note
This plugin is part of the community.general collection (version 3.8.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
.
To use it in a playbook, specify: community.general.iso_create
.
New in version 0.2.0: of community.general
Requirements
The below requirements are needed on the host that executes this module.
pycdlib
python >= 2.7
Parameters
Parameter |
Comments |
---|---|
The absolute path with file name of the new generated ISO file on local machine. Will create intermediate folders when they does not exist. |
|
The ISO9660 interchange level to use, it dictates the rules on the names of files. Levels and valid values The default value is level ISO9660 file names at interchange level Choices:
Default: 1 |
|
Support levels and valid values are Level If not specified, then no Joliet support is added. Choices:
|
|
Whether to make this ISO have the Rock Ridge extensions or not. Valid values are If unsure, set If not specified, then not add Rock Ridge extension to the ISO. Choices:
|
|
This is a list of absolute paths of source files or folders which will be contained in the new generated ISO file. Will fail if specified file or folder in Note: With all ISO9660 levels from 1 to 3, all file names are restricted to uppercase letters, numbers and underscores (_). File names are limited to 31 characters, directory nesting is limited to 8 levels, and path names are limited to 255 characters. |
|
Whether to add UDF support to this ISO. If set to If not specified or set to Choices:
|
|
The volume identification string to use on the new generated ISO image. |
Examples
- name: Create an ISO file
community.general.iso_create:
src_files:
- /root/testfile.yml
- /root/testfolder
dest_iso: /tmp/test.iso
interchange_level: 3
- name: Create an ISO file with Rock Ridge extension
community.general.iso_create:
src_files:
- /root/testfile.yml
- /root/testfolder
dest_iso: /tmp/test.iso
rock_ridge: 1.09
- name: Create an ISO file with Joliet support
community.general.iso_create:
src_files:
- ./windows_config/Autounattend.xml
dest_iso: ./test.iso
interchange_level: 3
joliet: 3
vol_ident: WIN_AUTOINSTALL
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Created iso file path. Returned: on success Sample: “/path/to/test.iso” |
|
Configured interchange level. Returned: on success Sample: 3 |
|
Configured Joliet support level. Returned: on success Sample: 3 |
|
Configured Rock Ridge version. Returned: on success Sample: “1.09” |
|
Configured source files or directories list. Returned: on success Sample: [“/path/to/file.txt”, “/path/to/folder”] |
|
Configured UDF support. Returned: on success Sample: false |
|
Configured volume identification string. Returned: on success Sample: “OEMDRV” |
Authors
Diane Wang (@Tomorrow9) <dianew@vmware.com>