ansible / ansible.builtin / v2.5.11 / module / cs_service_offering Manages service offerings on Apache CloudStack based clouds. | "added in version" 2.5 of ansible.builtin" Authors: René Moser (@resmo) preview | supported by communityansible.builtin.cs_service_offering (v2.5.11) — module
pip
Install with pip install ansible==2.5.11
Create and delete service offerings for guest and system VMs.
Update display_text of existing service offering.
- name: Create a non-volatile compute service offering with local storage local_action: module: 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 local_action: module: cs_service_offering name: Tiny display_text: Tiny 1gb 1cpu cpu_number: 1 cpu_speed: 2198 memory: 1024 storage_type: shared is_volatile: true host_tags: eco storage_tags: eco
- name: Create or update a volatile compute service offering with shared storage local_action: module: 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: Remove a compute service offering local_action: module: cs_service_offering name: Tiny state: absent
- name: Create or update a system offering for the console proxy local_action: module: 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 local_action: module: cs_service_offering name: System Offering for Console Proxy 2GB is_system: yes state: absent
name: description: - Name of the service offering. required: true state: choices: - present - absent default: present description: - State of the service offering. domain: description: - Domain the service offering is related to. - Public for all domains and subdomains if not set. memory: description: - The total memory of the service offering in MB. api_key: description: - API key of the CloudStack API. - If not given, the C(CLOUDSTACK_KEY) env variable is considered. required: true type: str api_url: description: - URL of the CloudStack API e.g. https://cloud.example.com/client/api. - If not given, the C(CLOUDSTACK_ENDPOINT) env variable is considered. required: true type: str offer_ha: choices: - true - false default: false description: - Whether HA is set for the service offering. cpu_speed: description: - The CPU speed of the service offering in MHz. host_tags: aliases: - host_tag description: - The host tagsfor this service offering. is_system: choices: - true - false default: false description: - Whether it is a system VM offering or not. api_secret: description: - Secret key of the CloudStack API. - If not set, the C(CLOUDSTACK_SECRET) env variable is considered. required: true type: str cpu_number: description: - The number of CPUs of the service offering. api_timeout: default: 10 description: - HTTP timeout in seconds. - If not given, the C(CLOUDSTACK_TIMEOUT) env variable is considered. type: int is_volatile: choices: - true - false default: false description: - 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. display_text: description: - Display text of the service offering. - If not set, C(name) will be used as C(display_text) while creating. network_rate: description: - Data transfer rate in Mb/s allowed. - Supported only for non-system offering and system offerings having C(system_vm_type=domainrouter). storage_tags: aliases: - storage_tag description: - The storage tags for this service offering. storage_type: choices: - local - shared description: - The storage type of the service offering. disk_iops_max: description: - Max. iops of the compute offering. disk_iops_min: description: - Min. iops of the compute offering. system_vm_type: choices: - domainrouter - consoleproxy - secondarystoragevm description: - The system VM type. - Required if C(is_system=true). api_http_method: choices: - get - post default: get description: - HTTP method used to query the API endpoint. - If not given, the C(CLOUDSTACK_METHOD) env variable is considered. type: str bytes_read_rate: description: - Bytes read rate of the disk offering. limit_cpu_usage: choices: - true - false description: - Restrict the CPU usage to committed service offering. bytes_write_rate: description: - Bytes write rate of the disk offering. provisioning_type: choices: - thin - sparse - fat description: - Provisioning type used to create volumes. deployment_planner: description: - The deployment planner heuristics used to deploy a VM of this offering. - If not set, the value of global config C(vm.deployment.planner) is used. api_verify_ssl_cert: description: - Verify CA authority cert file. - If not given, the C(CLOUDSTACK_VERIFY) env variable is considered. type: str disk_iops_read_rate: description: - IO requests read rate of the disk offering. disk_iops_customized: default: false description: - Whether compute offering iops is custom or not. disk_iops_write_rate: description: - IO requests write rate of the disk offering. service_offering_details: description: - Details for planner, used to store specific parameters. hypervisor_snapshot_reserve: description: - Hypervisor snapshot reserve space as a percent of a volume. - Only for managed storage using Xen or VMware.
cpu_number: description: Number of CPUs in the service offering returned: success sample: 4 type: int cpu_speed: description: Speed of CPUs in MHz in the service offering returned: success sample: 2198 type: int created: description: Date the offering was created returned: success sample: 2017-11-19T10:48:59+0000 type: string disk_bytes_read_rate: description: Bytes read rate of the service offering returned: success sample: 1000 type: int disk_bytes_write_rate: description: Bytes write rate of the service offering returned: success sample: 1000 type: int disk_iops_max: description: Max iops of the disk offering returned: success sample: 1000 type: int disk_iops_min: description: Min iops of the disk offering returned: success sample: 500 type: int disk_iops_read_rate: description: IO requests per second read rate of the service offering returned: success sample: 1000 type: int disk_iops_write_rate: description: IO requests per second write rate of the service offering returned: success sample: 1000 type: int display_text: description: Display text of the offering returned: success sample: Micro 512mb 1cpu type: string domain: description: Domain the offering is into returned: success sample: ROOT type: string host_tags: description: List of host tags returned: success sample: - eco type: list id: description: UUID of the service offering returned: success sample: a6f7a5fc-43f8-11e5-a151-feff819cdc9f type: string is_iops_customized: description: Whether the offering uses custom IOPS or not returned: success sample: false type: bool is_system: description: Whether the offering is for system VMs or not returned: success sample: false type: bool is_volatile: description: Whether the offering is volatile or not returned: success sample: false type: bool limit_cpu_usage: description: Whether the CPU usage is restricted to committed service offering returned: success sample: false type: bool memory: description: Memory of the system offering returned: success sample: 512 type: int name: description: Name of the system offering returned: success sample: Micro type: string network_rate: description: Data transfer rate in megabits per second allowed returned: success sample: 1000 type: int offer_ha: description: Whether HA support is enabled in the offering or not returned: success sample: false type: bool provisioning_type: description: Provisioning type used to create volumes returned: success sample: thin type: string service_offering_details: description: Additioanl service offering details returned: success sample: '{''vgpuType'': ''GRID K180Q'',''pciDevice'':''Group of NVIDIA Corporation GK107GL [GRID K1] GPUs''}' type: dict storage_tags: description: List of storage tags returned: success sample: - eco type: list storage_type: description: Storage type used to create volumes returned: success sample: shared type: string system_vm_type: description: System VM type of this offering returned: success sample: consoleproxy type: string