ansible / ansible.builtin / v2.5.11 / module / cs_storage_pool Manages Primary Storage Pools on Apache CloudStack based clouds. | "added in version" 2.4 of ansible.builtin" Authors: Netservers Ltd. (@netservers), René Moser (@resmo) preview | supported by communityansible.builtin.cs_storage_pool (v2.5.11) — module
pip
Install with pip install ansible==2.5.11
Create, update, put into maintenance, disable, enable and remove storage pools.
- name: ensure a zone scoped storage_pool is present local_action: module: cs_storage_pool zone: zone01 storage_url: rbd://admin:SECRET@ceph-mons.domain/poolname provider: DefaultPrimary name: Ceph RBD scope: zone hypervisor: KVM
- name: ensure a cluster scoped storage_pool is disabled local_action: module: cs_storage_pool name: Ceph RBD zone: zone01 cluster: cluster01 pod: pod01 storage_url: rbd://admin:SECRET@ceph-the-mons.domain/poolname provider: DefaultPrimary scope: cluster allocation_state: disabled
- name: ensure a cluster scoped storage_pool is in maintenance local_action: module: cs_storage_pool name: Ceph RBD zone: zone01 cluster: cluster01 pod: pod01 storage_url: rbd://admin:SECRET@ceph-the-mons.domain/poolname provider: DefaultPrimary scope: cluster allocation_state: maintenance
- name: ensure a storage_pool is absent local_action: module: cs_storage_pool name: Ceph RBD state: absent
pod: description: - Name of the pod. name: description: - Name of the storage pool. required: true zone: description: - Name of the zone in which the host should be deployed. - If not set, default zone is used. scope: choices: - cluster - zone description: - The scope of the storage pool. - Defaults to cluster when C(cluster) is provided, otherwise zone. state: choices: - present - absent default: present description: - State of the storage pool. 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 cluster: description: - Name of the cluster. managed: description: - Whether the storage pool should be managed by CloudStack. - Only considere on creation. provider: default: DefaultPrimary description: - Name of the storage provider e.g. SolidFire, SolidFireShared, DefaultPrimary, CloudByte. api_secret: description: - Secret key of the CloudStack API. - If not set, the C(CLOUDSTACK_SECRET) env variable is considered. required: true type: str hypervisor: choices: - KVM - VMware - BareMetal - XenServer - LXC - HyperV - UCS - OVM - Simulator description: - Required when creating a zone scoped pool. api_timeout: default: 10 description: - HTTP timeout in seconds. - If not given, the C(CLOUDSTACK_TIMEOUT) env variable is considered. type: int storage_url: description: - URL of the storage pool. - Required if C(state=present). storage_tags: description: - Tags associated with this storage pool. capacity_iops: description: - Bytes CloudStack can provision from this storage pool. capacity_bytes: description: - Bytes CloudStack can provision from this storage pool. 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 allocation_state: choices: - enabled - disabled description: - Allocation state of the storage pool. api_verify_ssl_cert: description: - Verify CA authority cert file. - If not given, the C(CLOUDSTACK_VERIFY) env variable is considered. type: str
allocation_state: description: The state of the storage pool. returned: success sample: enabled type: string capacity_iops: description: IOPS CloudStack can provision from this storage pool returned: when available sample: 60000 type: int cluster: description: The name of the cluster. returned: when scope is cluster sample: Cluster01 type: string created: description: Date of the pool was created. returned: success sample: 2014-12-01T14:57:57+0100 type: string disk_size_allocated: description: The pool's currently allocated disk space. returned: success sample: 2443517624320 type: int disk_size_total: description: The total size of the pool. returned: success sample: 3915055693824 type: int disk_size_used: description: The pool's currently used disk size. returned: success sample: 1040862622180 type: int hypervisor: description: Hypervisor related to this storage pool. returned: when available sample: KVM type: string id: description: UUID of the pool. returned: success sample: a3fca65a-7db1-4891-b97c-48806a978a96 type: string overprovision_factor: description: The overprovision factor of the storage pool. returned: success sample: 2.0 type: string path: description: The storage pool path used in the storage_url. returned: success sample: poolname type: string pod: description: The name of the pod. returned: when scope is cluster sample: Cluster01 type: string scope: description: The scope of the storage pool. returned: success sample: cluster type: string state: description: The state of the storage pool as returned by the API. returned: success sample: Up type: string storage_capabilities: description: Capabilities of the torage pool. returned: success sample: VOLUME_SNAPSHOT_QUIESCEVM: 'false' type: dict storage_tags: description: the tags for the storage pool. returned: success sample: - perf - ssd type: list suitable_for_migration: description: Whether the storage pool is suitable to migrate a volume or not. returned: success sample: false type: bool zone: description: The name of the zone. returned: success sample: Zone01 type: string