community.general.cs_disk_offering (0.1.1) — module

Manages disk offerings on Apache CloudStack based clouds.

Authors: David Passante (@dpassante), René Moser (@resmo)

preview | supported by community

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

Create and delete disk offerings for guest VMs.

Update display_text or display_offering of existing disk offering.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a disk offering with local storage
  cs_disk_offering:
    name: small
    display_text: Small 10GB
    disk_size: 10
    storage_type: local
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create or update a disk offering with shared storage
  cs_disk_offering:
    name: small
    display_text: Small 10GB
    disk_size: 10
    storage_type: shared
    storage_tags: SAN01
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove a disk offering
  cs_disk_offering:
    name: small
    state: absent
  delegate_to: localhost

Inputs

    
name:
    description:
    - Name of the disk offering.
    required: true
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - State of the disk offering.
    type: str

domain:
    description:
    - Domain the disk offering is related to.
    - Public for all domains and subdomains if not set.
    type: str

api_key:
    description:
    - API key of the CloudStack API.
    - If not given, the C(CLOUDSTACK_KEY) env variable is considered.
    - As the last option, the value is taken from the ini config file, also see the notes.
    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.
    - As the last option, the value is taken from the ini config file, also see the notes.
    type: str

iops_max:
    description:
    - Max. iops of the disk offering.
    type: int

iops_min:
    description:
    - Min. iops of the disk offering.
    type: int

disk_size:
    description:
    - Size of the disk offering in GB (1GB = 1,073,741,824 bytes).
    type: int

api_region:
    default: cloudstack
    description:
    - Name of the ini section in the C(cloustack.ini) file.
    - If not given, the C(CLOUDSTACK_REGION) env variable is considered.
    type: str

api_secret:
    description:
    - Secret key of the CloudStack API.
    - If not set, the C(CLOUDSTACK_SECRET) env variable is considered.
    - As the last option, the value is taken from the ini config file, also see the notes.
    type: str

customized:
    default: false
    description:
    - Whether disk offering iops is custom or not.
    type: bool

api_timeout:
    description:
    - HTTP timeout in seconds.
    - If not given, the C(CLOUDSTACK_TIMEOUT) env variable is considered.
    - As the last option, the value is taken from the ini config file, also see the notes.
    - Fallback value is 10 seconds if not specified.
    type: int

display_text:
    description:
    - Display text of the disk offering.
    - If not set, C(name) will be used as C(display_text) while creating.
    type: str

storage_tags:
    aliases:
    - storage_tag
    description:
    - The storage tags for this disk offering.
    type: list

storage_type:
    choices:
    - local
    - shared
    description:
    - The storage type of the disk offering.
    type: str

iops_read_rate:
    description:
    - IO requests read rate of the disk offering.
    type: int

api_http_method:
    choices:
    - get
    - post
    description:
    - HTTP method used to query the API endpoint.
    - If not given, the C(CLOUDSTACK_METHOD) env variable is considered.
    - As the last option, the value is taken from the ini config file, also see the notes.
    - Fallback value is C(get) if not specified.
    type: str

bytes_read_rate:
    description:
    - Bytes read rate of the disk offering.
    type: int

iops_write_rate:
    description:
    - IO requests write rate of the disk offering.
    type: int

bytes_write_rate:
    description:
    - Bytes write rate of the disk offering.
    type: int

display_offering:
    description:
    - An optional field, whether to display the offering to the end user or not.
    type: bool

provisioning_type:
    choices:
    - thin
    - sparse
    - fat
    description:
    - Provisioning type used to create volumes.
    type: str

hypervisor_snapshot_reserve:
    description:
    - Hypervisor snapshot reserve space as a percent of a volume.
    - Only for managed storage using Xen or VMware.
    type: int

Outputs

bytes_read_rate:
  description: Bytes read rate of the disk offering
  returned: success
  sample: 1000
  type: int
bytes_write_rate:
  description: Bytes write rate of the disk offering
  returned: success
  sample: 1000
  type: int
created:
  description: Date the offering was created
  returned: success
  sample: 2017-11-19T10:48:59+0000
  type: str
customized:
  description: Whether the offering uses custom IOPS or not
  returned: success
  sample: false
  type: bool
disk_size:
  description: Size of the disk offering in GB
  returned: success
  sample: 10
  type: int
display_offering:
  description: Whether to display the offering to the end user or not.
  returned: success
  sample: false
  type: bool
display_text:
  description: Display text of the offering
  returned: success
  sample: Small 10GB
  type: str
domain:
  description: Domain the offering is into
  returned: success
  sample: ROOT
  type: str
id:
  description: UUID of the disk offering
  returned: success
  sample: a6f7a5fc-43f8-11e5-a151-feff819cdc9f
  type: str
iops_max:
  description: Max iops of the disk offering
  returned: success
  sample: 1000
  type: int
iops_min:
  description: Min iops of the disk offering
  returned: success
  sample: 500
  type: int
iops_read_rate:
  description: IO requests per second read rate of the disk offering
  returned: success
  sample: 1000
  type: int
iops_write_rate:
  description: IO requests per second write rate of the disk offering
  returned: success
  sample: 1000
  type: int
name:
  description: Name of the system offering
  returned: success
  sample: Micro
  type: str
provisioning_type:
  description: Provisioning type used to create volumes
  returned: success
  sample: thin
  type: str
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: str