ngine_io.cloudstack.cs_storage_pool – Manages Primary Storage Pools 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_storage_pool
.
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 |
---|---|
Allocation state of the storage pool. Choices:
|
|
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 |
|
Bytes CloudStack can provision from this storage pool. |
|
Bytes CloudStack can provision from this storage pool. |
|
Name of the cluster. |
|
Required when creating a zone scoped pool. Possible values are |
|
Whether the storage pool should be managed by CloudStack. Only considered on creation. Choices:
|
|
Name of the storage pool. |
|
Name of the pod. |
|
Name of the storage provider e.g. SolidFire, SolidFireShared, DefaultPrimary, CloudByte. Default: “DefaultPrimary” |
|
The scope of the storage pool. Defaults to cluster when Choices:
|
|
State of the storage pool. Choices:
|
|
Tags associated with this storage pool. |
|
URL of the storage pool. Required if state=present. |
|
Name of the zone in which the host should be deployed. |
Notes
Note
A detailed guide about cloudstack modules can be found in the CloudStack Cloud Guide.
This module supports check mode.
Examples
- name: ensure a zone scoped storage_pool is present
ngine_io.cloudstack.cs_storage_pool:
zone: zone01
storage_url: rbd://admin:[email protected]/poolname
provider: DefaultPrimary
name: Ceph RBD
scope: zone
hypervisor: KVM
- name: ensure a cluster scoped storage_pool is disabled
ngine_io.cloudstack.cs_storage_pool:
name: Ceph RBD
zone: zone01
cluster: cluster01
pod: pod01
storage_url: rbd://admin:[email protected]/poolname
provider: DefaultPrimary
scope: cluster
allocation_state: disabled
- name: ensure a cluster scoped storage_pool is in maintenance
ngine_io.cloudstack.cs_storage_pool:
name: Ceph RBD
zone: zone01
cluster: cluster01
pod: pod01
storage_url: rbd://admin:[email protected]/poolname
provider: DefaultPrimary
scope: cluster
allocation_state: maintenance
- name: ensure a storage_pool is absent
ngine_io.cloudstack.cs_storage_pool:
name: Ceph RBD
zone: zone01
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The state of the storage pool. Returned: success Sample: “enabled” |
|
IOPS CloudStack can provision from this storage pool Returned: when available Sample: 60000 |
|
The name of the cluster. Returned: when scope is cluster Sample: “Cluster01” |
|
Date of the pool was created. Returned: success Sample: “2014-12-01T14:57:57+0100” |
|
The pool’s currently allocated disk space. Returned: success Sample: 2443517624320 |
|
The total size of the pool. Returned: success Sample: 3915055693824 |
|
The pool’s currently used disk size. Returned: success Sample: 1040862622180 |
|
Hypervisor related to this storage pool. Returned: when available Sample: “KVM” |
|
UUID of the pool. Returned: success Sample: “a3fca65a-7db1-4891-b97c-48806a978a96” |
|
The overprovision factor of the storage pool. Returned: success Sample: 2.0 |
|
The storage pool path used in the storage_url. Returned: success Sample: “poolname” |
|
The name of the pod. Returned: when scope is cluster Sample: “Cluster01” |
|
The scope of the storage pool. Returned: success Sample: “cluster” |
|
The state of the storage pool as returned by the API. Returned: success Sample: “Up” |
|
Capabilities of the storage pool. Returned: success Sample: {“VOLUME_SNAPSHOT_QUIESCEVM”: “false”} |
|
the tags for the storage pool. Returned: success Sample: [“perf”, “ssd”] |
|
Whether the storage pool is suitable to migrate a volume or not. Returned: success Sample: false |
|
The name of the zone. Returned: success Sample: “Zone01” |
Authors
Netservers Ltd. (@netservers)
René Moser (@resmo)