scale_computing.hypercore.iso_info module – Retrieve ISO images

Note

This module is part of the scale_computing.hypercore collection (version 1.6.0).

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 scale_computing.hypercore.

To use it in a playbook, specify: scale_computing.hypercore.iso_info.

New in scale_computing.hypercore 1.0.0

Synopsis

  • Retrieve a list of ISO images from HyperCore API endpoint /rest/v1/ISO.

Parameters

Parameter

Comments

cluster_instance

dictionary

Scale Computing HyperCore instance information.

auth_method

string

Select login method. If not set, the value of the SC_AUTH_METHOD environment variable will be used.

Value local - username/password is verified by the HyperCore server (the local users).

Value oidc - username/password is verified by the configured OIDC provider.

Choices:

  • "local" ← (default)

  • "oidc"

host

string / required

The HyperCore instance URL.

If not set, the value of the SC_HOST environment variable will be used.

For example “https://10.1.2.3:443”.

password

string / required

Password used for authentication.

If not set, the value of the SC_PASSWORD environment variable will be used.

timeout

float

Timeout in seconds for the connection with the Scale Computing HyperCore API instance.

If not set, the value of the SC_TIMEOUT environment variable will be used.

username

string / required

Username used for authentication.

If not set, the value of the SC_USERNAME environment variable will be used.

name

string

ISO image’s name.

If specified, the ISO image with that specific name will get returned.

Otherwise, all ISO images are going to get listed.

See Also

See also

scale_computing.hypercore.iso

Manage ISO images on HyperCore API.

Examples

- name: Retrieve all ISO images
  scale_computing.hypercore.iso_info:
  register: result

- name: Retrieve a specific ISO image by name
  scale_computing.hypercore.iso_info:
    name: SW_DVD9_Win_Server_STD_CORE_2022_2108.11_64Bit_English_DC_STD_MLF_X23-17134.ISO
  register: result

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

records

list / elements=dictionary

ISO images for which we’re performing the query.

If name is specified, the module will return exactly one record, if the record exists, and 0, if there is no matching name.

If name is not specified, all ISO images will be returned

Returned: success

mounts

list / elements=dictionary

VMs this image is attached to

Returned: success

Sample: {"vm_name": "xlab", "vm_uuid": "51e6d073-7566-4273-9196-58720117bd7f"}

name

string

Filename of the image

Returned: success

Sample: "SW_DVD9_Win_Server_STD_CORE_2022_2108.11_64Bit_English_DC_STD_MLF_X23-17134.ISO"

path

string

Storage device used in conjunction with VirDomainBlockDevice.path

Returned: success

Sample: "scribe/171afce9-2452-4294-9bc4-6e8ae49f7e4c"

ready_for_insert

boolean

The flag indicates the ISO image content is fully uploaded, and image is ready to be used.

Flag is `false` only for images that are in middle of upload, or where upload was terminated in middle.

Returned: success

Sample: true

size

integer

Size of the ISO file, in bytes

Returned: success

Sample: 5110759424

uuid

string

Unique identifier

Returned: success

Sample: "171afce9-2452-4294-9bc4-6e8ae49f7e4c"

Authors

  • Tjaž Eržen (@tjazsch)