ngine_io.cloudstack.cs_iso – Manages ISO images on Apache CloudStack based clouds.
Note
This plugin is part of the ngine_io.cloudstack collection (version 2.2.2).
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 ngine_io.cloudstack
.
To use it in a playbook, specify: ngine_io.cloudstack.cs_iso
.
New in version 0.1.0: of ngine_io.cloudstack
Requirements
The below requirements are needed on the host that executes this module.
python >= 2.6
cs >= 0.9.0
Parameters
Parameter |
Comments |
---|---|
Account the ISO is related to. |
|
HTTP method used to query the API endpoint. If not given, the Choices:
|
|
API key of the CloudStack API. If not given, the |
|
Secret key of the CloudStack API. If not set, the |
|
HTTP timeout in seconds. If not given, the Default: 10 |
|
URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the |
|
Verify CA authority cert file. If not given, the |
|
Register the ISO to be bootable. Only used if state is present. Choices:
|
|
The MD5 checksum value of this ISO. If set, we search by checksum instead of name. |
|
Whether the ISO should be synced or removed across zones. Mutually exclusive with zone. Choices:
|
|
Display text of the ISO. If not specified, name will be used. |
|
Domain the ISO is related to. |
|
Register the ISO having XS/VMware tools installed inorder to support dynamic scaling of VM cpu/memory. Only used if state is present. Choices:
|
|
Register the ISO to be featured. Only used if state is present. Choices:
|
|
Register the ISO to be publicly available to all users. Only used if state is present. Choices:
|
|
This flag is used for searching existing ISOs. If set to Choices:
|
|
Name of the filter used to search for the ISO. Choices:
|
|
Name of the ISO. |
|
Name of the OS that best represents the OS of this ISO. If the iso is bootable this parameter needs to be passed. Required if state is present. |
|
Poll async jobs until job has finished. Choices:
|
|
Name of the project the ISO to be registered in. |
|
State of the ISO. Choices:
|
|
List of tags. Tags are a list of dictionaries having keys key and value. To delete all tags, set a empty list e.g. tags: []. |
|
URL where the ISO can be downloaded from. Required if state is present. |
|
Name of the zone you wish the ISO to be registered or deleted from. Required when cross_zones is |
Notes
Note
A detailed guide about cloudstack modules can be found in the CloudStack Cloud Guide.
This module supports check mode.
Examples
- name: Register an ISO if ISO name does not already exist
ngine_io.cloudstack.cs_iso:
name: Debian 7 64-bit
zone: zone01
url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
os_type: Debian GNU/Linux 7(64-bit)
- name: Register an ISO with given name if ISO md5 checksum does not already exist
ngine_io.cloudstack.cs_iso:
name: Debian 7 64-bit
zone: zone01
url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
os_type: Debian GNU/Linux 7(64-bit)
checksum: 0b31bccccb048d20b551f70830bb7ad0
- name: Remove an ISO by name
ngine_io.cloudstack.cs_iso:
name: Debian 7 64-bit
zone: zone01
state: absent
- name: Remove an ISO by checksum
ngine_io.cloudstack.cs_iso:
name: Debian 7 64-bit
zone: zone01
checksum: 0b31bccccb048d20b551f70830bb7ad0
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Account the ISO is related to. Returned: success Sample: “example account” |
|
True if the ISO is bootable. Returned: success Sample: true |
|
MD5 checksum of the ISO. Returned: success Sample: “0b31bccccb048d20b551f70830bb7ad0” |
|
Date of registering. Returned: success Sample: “2015-03-29T14:57:06+0200” |
|
true if the ISO is managed across all zones, false otherwise. Returned: success Sample: false |
|
Text to be displayed of the ISO. Returned: success Sample: “Debian 7.7 64-bit minimal 2015-03-19” |
|
Domain the ISO is related to. Returned: success Sample: “example domain” |
|
Format of the ISO. Returned: success Sample: “ISO” |
|
UUID of the ISO. Returned: success Sample: “a6f7a5fc-43f8-11e5-a151-feff819cdc9f” |
|
True if the ISO is featured. Returned: success Sample: true |
|
True if the ISO is public. Returned: success Sample: true |
|
True if the ISO is ready to be deployed from. Returned: success Sample: true |
|
Name of the ISO. Returned: success Sample: “Debian 7 64-bit” |
|
Typo of the OS. Returned: success Sample: “CentOS 6.5 (64-bit)” |
|
Project the ISO is related to. Returned: success Sample: “example project” |
|
Status of the ISO. Returned: success Sample: “Successfully Installed” |
|
List of resource tags associated with the ISO. Returned: success Sample: “[ { \”key\”: \”foo\”, \”value\”: \”bar\” } ]” |
|
Name of zone the ISO is registered in. Returned: success Sample: “zuerich” |
Authors
René Moser (@resmo)