profitbricks_volume - Create or destroy a volume.
- Allows you to create or remove a volume from a ProfitBricks datacenter. This module has a dependency on profitbricks >= 1.0.0
The below requirements are needed on the host that executes this module.
Parameter |
Choices/Defaults |
Comments |
auto_increment
bool |
|
Whether or not to increment a single number in the name for created virtual machines.
|
bus
|
|
The bus type.
|
count
|
Default:
1
|
The number of volumes you wish to create.
|
datacenter
required |
|
The datacenter in which to create the volumes.
|
disk_type
|
|
The disk type of the volume.
|
image
required |
|
The system image ID for the volume, e.g. a3eae284-a2fe-11e4-b187-5f1f641608c8. This can also be a snapshot image ID.
|
image_password
(added in 2.2) |
|
Password set for the administrative user.
|
instance_ids
|
|
list of instance ids, currently only used when state='absent' to remove instances.
|
licence_type
|
Choices:
- LINUX
- WINDOWS
UNKNOWN ←
- OTHER
|
The licence type for the volume. This is used when the image is non-standard.
|
name
required |
|
The name of the volumes. You can enumerate the names using auto_increment.
|
size
|
Default:
10
|
The size of the volume.
|
ssh_keys
(added in 2.2) |
|
Public SSH keys allowing access to the virtual machine.
|
state
|
Choices:
present ←
- absent
|
create or terminate datacenters
|
subscription_password
|
|
THe ProfitBricks password. Overrides the PB_PASSWORD environment variable.
|
subscription_user
|
|
The ProfitBricks username. Overrides the PB_SUBSCRIPTION_ID environment variable.
|
wait
bool |
|
wait for the datacenter to be created before returning
|
wait_timeout
|
Default:
600
|
how long before wait gives up, in seconds
|
# Create Multiple Volumes
- profitbricks_volume:
datacenter: Tardis One
name: vol%02d
count: 5
auto_increment: yes
wait_timeout: 500
state: present
# Remove Volumes
- profitbricks_volume:
datacenter: Tardis One
instance_ids:
- 'vol01'
- 'vol02'
wait_timeout: 500
state: absent
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Hint
If you notice any issues in this documentation you can edit this document to improve it.