community.general.profitbricks_volume module – Create or destroy a volume
Note
This module is part of the community.general collection (version 10.1.0).
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 community.general
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.general.profitbricks_volume
.
Synopsis
Allows you to create or remove a volume from a ProfitBricks datacenter. This module has a dependency on profitbricks >= 1.0.0
Requirements
The below requirements are needed on the host that executes this module.
profitbricks
Parameters
Parameter |
Comments |
---|---|
Whether or not to increment a single number in the name for created virtual machines. Choices:
|
|
The bus type. Choices:
|
|
The number of volumes you wish to create. Default: |
|
The datacenter in which to create the volumes. |
|
The disk type of the volume. Choices:
|
|
The system image ID for the volume, e.g. a3eae284-a2fe-11e4-b187-5f1f641608c8. This can also be a snapshot image ID. |
|
Password set for the administrative user. |
|
list of instance ids, currently only used when state=’absent’ to remove instances. Default: |
|
The licence type for the volume. This is used when the image is non-standard. The available choices are: Default: |
|
The name of the volumes. You can enumerate the names using auto_increment. |
|
Server name to attach the volume to. |
|
The size of the volume. Default: |
|
Public SSH keys allowing access to the virtual machine. Default: |
|
create or terminate datacenters The available choices are: Default: |
|
THe ProfitBricks password. Overrides the PB_PASSWORD environment variable. |
|
The ProfitBricks username. Overrides the PB_SUBSCRIPTION_ID environment variable. |
|
wait for the datacenter to be created before returning Choices:
|
|
how long before wait gives up, in seconds Default: |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: none |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Examples
- name: Create multiple volumes
community.general.profitbricks_volume:
datacenter: Tardis One
name: vol%02d
count: 5
auto_increment: true
wait_timeout: 500
state: present
- name: Remove Volumes
community.general.profitbricks_volume:
datacenter: Tardis One
instance_ids:
- 'vol01'
- 'vol02'
wait_timeout: 500
state: absent