scale_computing.hypercore.iso module – Manage ISO images on HyperCore API
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
.
New in scale_computing.hypercore 1.0.0
Synopsis
Use this module to upload a new ISO image from ansible controller to HyperCore or delete existing ISO images from HyperCore API.
An ISO image can be uploaded from a shared (SMB) storage or from an HTTP link by downloading it first to the ansible controller’s local disk.
Parameters
Parameter |
Comments |
---|---|
Scale Computing HyperCore instance information. |
|
Select login method. If not set, the value of the 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:
|
|
The HyperCore instance URL. If not set, the value of the For example “https://10.1.2.3:443”. |
|
Password used for authentication. If not set, the value of the |
|
Timeout in seconds for the connection with the Scale Computing HyperCore API instance. If not set, the value of the |
|
Username used for authentication. If not set, the value of the |
|
ISO image’s name. If ISO object with such name already exists on HyperCore API, no action will be performed. Otherwise, ISO object with such name will be created and iso image from the source uploaded. |
|
Only relevant if you want to post an iso image to the HyperCore API (setting path to ISO image on ansible controller. It must not be http or smb link |
|
The desired state of iso object. If state=present, the module uploads new ISO image from ansible controller. If state=absent, the module deletes an existing ISO image from HyperCore API. Choices:
|
Notes
Note
check_mode
is not supported.Return value
record
is added in version 1.2.0, and deprecates return valueresults
. Return valueresults
will be removed in future release. List of deprecation changes includes examples to help with transition.
See Also
See also
- scale_computing.hypercore.iso_info
Retrieve ISO images.
Examples
- name: Create ISO image
scale_computing.hypercore.iso:
name: CentOS-Stream-9-latest-x86_64-dvd1.iso
source: /path/to/my.iso # filename on ansible controller, never http/smb link
state: present
- name: Remove ISO image
scale_computing.hypercore.iso:
name: CentOS-Stream-9-latest-x86_64-dvd1.iso
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Updated ISO object from HyperCore API. Returned: success |
|
VMs this image is attached to Returned: success Sample: |
|
Filename of the image, must end in “.iso” Returned: success Sample: |
|
Storage device used in conjunction with VirDomainBlockDevice.path Returned: success Sample: |
|
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: |
|
Size of the ISO file, in bytes Returned: success Sample: |
|
Unique identifier Returned: success Sample: |
|
List with one element - updated ISO object from HyperCore API. This value is deprecated and will be removed in a future release. Please use record instead. Returned: success |
|
VMs this image is attached to Returned: success Sample: |
|
Filename of the image Returned: success Sample: |
|
Storage device used in conjunction with VirDomainBlockDevice.path Returned: success Sample: |
|
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: |
|
Size of the ISO file, in bytes Returned: success Sample: |
|
Unique identifier Returned: success Sample: |