ngine_io.cloudstack.cs_volume – Manages volumes on Apache CloudStack based clouds.¶
Note
This plugin is part of the ngine_io.cloudstack collection (version 2.1.0).
To install it use: ansible-galaxy collection install ngine_io.cloudstack
.
To use it in a playbook, specify: ngine_io.cloudstack.cs_volume
.
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¶
Notes¶
Note
A detailed guide about cloudstack modules can be found in the CloudStack Cloud Guide.
This module supports check mode.
Examples¶
- name: create volume within project and zone with specified storage options
ngine_io.cloudstack.cs_volume:
name: web-vm-1-volume
project: Integration
zone: ch-zrh-ix-01
disk_offering: PerfPlus Storage
size: 20
- name: create/attach volume to instance
ngine_io.cloudstack.cs_volume:
name: web-vm-1-volume
zone: zone01
disk_offering: PerfPlus Storage
size: 20
vm: web-vm-1
state: attached
- name: detach volume
ngine_io.cloudstack.cs_volume:
name: web-vm-1-volume
zone: zone01
state: detached
- name: remove volume
ngine_io.cloudstack.cs_volume:
name: web-vm-1-volume
zone: zone01
state: absent
- name: Extract DATA volume to make it downloadable
ngine_io.cloudstack.cs_volume:
state: extracted
name: web-vm-1-volume
zone: zone01
register: data_vol_out
- name: Create new volume by downloading source volume
ngine_io.cloudstack.cs_volume:
state: uploaded
name: web-vm-1-volume-2
zone: zone01
format: VHD
url: "{{ data_vol_out.url }}"
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Jefferson Girão (@jeffersongirao)
René Moser (@resmo)