community.general.iso_create (8.5.0) — module

Generate ISO file with specified files or folders

| "added in version" 0.2.0 of community.general"

Authors: Diane Wang (@Tomorrow9) <dianew@vmware.com>

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

This module is used to generate ISO file with specified path of files.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create an ISO file
  community.general.iso_create:
    src_files:
      - /root/testfile.yml
      - /root/testfolder
    dest_iso: /tmp/test.iso
    interchange_level: 3
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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

Inputs

    
udf:
    default: false
    description:
    - Whether to add UDF support to this ISO.
    - If set to V(true), then version 2.60 of the UDF spec is used.
    - If not specified or set to V(false), then no UDF support is added.
    type: bool

joliet:
    choices:
    - 1
    - 2
    - 3
    description:
    - Support levels and valid values are V(1), V(2), or V(3).
    - Level V(3) is by far the most common.
    - If not specified, then no Joliet support is added.
    type: int

dest_iso:
    description:
    - The absolute path with file name of the new generated ISO file on local machine.
    - Will create intermediate folders when they does not exist.
    required: true
    type: path

src_files:
    description:
    - 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 O(src_files) does not exist on local machine.
    - '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.'
    elements: path
    required: true
    type: list

vol_ident:
    description:
    - The volume identification string to use on the new generated ISO image.
    type: str

rock_ridge:
    choices:
    - '1.09'
    - '1.10'
    - '1.12'
    description:
    - Whether to make this ISO have the Rock Ridge extensions or not.
    - Valid values are V(1.09), V(1.10) or V(1.12), means adding the specified Rock Ridge
      version to the ISO.
    - If unsure, set V(1.09) to ensure maximum compatibility.
    - If not specified, then not add Rock Ridge extension to the ISO.
    type: str

interchange_level:
    choices:
    - 1
    - 2
    - 3
    - 4
    default: 1
    description:
    - The ISO9660 interchange level to use, it dictates the rules on the names of files.
    - Levels and valid values V(1), V(2), V(3), V(4) are supported.
    - The default value is level V(1), which is the most conservative, level V(3) is recommended.
    - ISO9660 file names at interchange level V(1) cannot have more than 8 characters
      or 3 characters in the extension.
    type: int

Outputs

created_iso:
  description: Created iso file path.
  returned: on success
  sample: /path/to/test.iso
  type: str
interchange_level:
  description: Configured interchange level.
  returned: on success
  sample: 3
  type: int
joliet:
  description: Configured Joliet support level.
  returned: on success
  sample: 3
  type: int
rock_ridge:
  description: Configured Rock Ridge version.
  returned: on success
  sample: '1.09'
  type: str
source_file:
  description: Configured source files or directories list.
  elements: path
  returned: on success
  sample:
  - /path/to/file.txt
  - /path/to/folder
  type: list
udf:
  description: Configured UDF support.
  returned: on success
  sample: false
  type: bool
vol_ident:
  description: Configured volume identification string.
  returned: on success
  sample: OEMDRV
  type: str