ngine_io.cloudstack.cs_service_offering module – Manages service offerings on Apache CloudStack based clouds.
Note
This module is part of the ngine_io.cloudstack collection (version 2.3.0).
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
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: ngine_io.cloudstack.cs_service_offering
.
New in ngine_io.cloudstack 0.1.0
Synopsis
Create and delete service offerings for guest and system VMs.
Update display_text of existing service offering.
Requirements
The below requirements are needed on the host that executes this module.
python >= 2.6
cs >= 0.9.0
Parameters
Parameter |
Comments |
---|---|
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: |
|
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 |
|
The number of CPUs of the service offering. |
|
The CPU speed of the service offering in MHz. |
|
The deployment planner heuristics used to deploy a VM of this offering. If not set, the value of global config vm.deployment.planner is used. |
|
Bytes read rate of the disk offering. |
|
Bytes write rate of the disk offering. |
|
Max. iops of the compute offering. |
|
Min. iops of the compute offering. |
|
IO requests read rate of the disk offering. |
|
IO requests write rate of the disk offering. |
|
Display text of the service offering. If not set, name will be used as display_text while creating. |
|
Domain the service offering is related to. Public for all domains and subdomains if not set. |
|
The host tags for this service offering. |
|
Hypervisor snapshot reserve space as a percent of a volume. Only for managed storage using Xen or VMware. |
|
Whether the offering is customizable or not. Choices:
|
|
Whether compute offering iops is custom or not. Choices:
|
|
Whether it is a system VM offering or not. Choices:
|
|
Whether the virtual machine needs to be volatile or not. Every reboot of VM the root disk is detached then destroyed and a fresh root disk is created and attached to VM. Choices:
|
|
Restrict the CPU usage to committed service offering. Choices:
|
|
The total memory of the service offering in MB. |
|
Name of the service offering. |
|
Data transfer rate in Mb/s allowed. Supported only for non-system offering and system offerings having system_vm_type=domainrouter. |
|
Whether HA is set for the service offering. Choices:
|
|
Provisioning type used to create volumes. Choices:
|
|
Details for planner, used to store specific parameters. A list of dictionaries having keys |
|
State of the service offering. Choices:
|
|
The storage tags for this service offering. |
|
The storage type of the service offering. Choices:
|
|
The system VM type. Required if is_system=yes. Choices:
|
Notes
Note
A detailed guide about cloudstack modules can be found in the CloudStack Cloud Guide.
This module supports check mode.
Examples
- name: Create a non-volatile compute service offering with local storage
ngine_io.cloudstack.cs_service_offering:
name: Micro
display_text: Micro 512mb 1cpu
cpu_number: 1
cpu_speed: 2198
memory: 512
host_tags: eco
storage_type: local
- name: Create a volatile compute service offering with shared storage
ngine_io.cloudstack.cs_service_offering:
name: Tiny
display_text: Tiny 1gb 1cpu
cpu_number: 1
cpu_speed: 2198
memory: 1024
storage_type: shared
is_volatile: yes
host_tags: eco
storage_tags: eco
- name: Create or update a volatile compute service offering with shared storage
ngine_io.cloudstack.cs_service_offering:
name: Tiny
display_text: Tiny 1gb 1cpu
cpu_number: 1
cpu_speed: 2198
memory: 1024
storage_type: shared
is_volatile: yes
host_tags: eco
storage_tags: eco
- name: Create or update a custom compute service offering
ngine_io.cloudstack.cs_service_offering:
name: custom
display_text: custom compute offer
is_customized: yes
storage_type: shared
host_tags: eco
storage_tags: eco
- name: Remove a compute service offering
ngine_io.cloudstack.cs_service_offering:
name: Tiny
state: absent
- name: Create or update a system offering for the console proxy
ngine_io.cloudstack.cs_service_offering:
name: System Offering for Console Proxy 2GB
display_text: System Offering for Console Proxy 2GB RAM
is_system: yes
system_vm_type: consoleproxy
cpu_number: 1
cpu_speed: 2198
memory: 2048
storage_type: shared
storage_tags: perf
- name: Remove a system offering
ngine_io.cloudstack.cs_service_offering:
name: System Offering for Console Proxy 2GB
is_system: yes
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Number of CPUs in the service offering Returned: success Sample: |
|
Speed of CPUs in MHz in the service offering Returned: success Sample: |
|
Date the offering was created Returned: success Sample: |
|
Bytes read rate of the service offering Returned: success Sample: |
|
Bytes write rate of the service offering Returned: success Sample: |
|
Max iops of the disk offering Returned: success Sample: |
|
Min iops of the disk offering Returned: success Sample: |
|
IO requests per second read rate of the service offering Returned: success Sample: |
|
IO requests per second write rate of the service offering Returned: success Sample: |
|
Display text of the offering Returned: success Sample: |
|
Domain the offering is into Returned: success Sample: |
|
List of host tags Returned: success Sample: |
|
UUID of the service offering Returned: success Sample: |
|
Whether the offering is customizable or not Returned: success Sample: |
|
Whether the offering uses custom IOPS or not Returned: success Sample: |
|
Whether the offering is for system VMs or not Returned: success Sample: |
|
Whether the offering is volatile or not Returned: success Sample: |
|
Whether the CPU usage is restricted to committed service offering Returned: success Sample: |
|
Memory of the system offering Returned: success Sample: |
|
Name of the system offering Returned: success Sample: |
|
Data transfer rate in megabits per second allowed Returned: success Sample: |
|
Whether HA support is enabled in the offering or not Returned: success Sample: |
|
Provisioning type used to create volumes Returned: success Sample: |
|
Additioanl service offering details Returned: success Sample: |
|
List of storage tags Returned: success Sample: |
|
Storage type used to create volumes Returned: success Sample: |
|
System VM type of this offering Returned: success Sample: |