New in version 2.2.
parameter | required | default | choices | comments |
---|---|---|---|---|
api_token |
yes | DigitalOcean api token. | ||
block_size |
no | The size of the Block Storage volume in gigabytes. Required when command=create and state=present. | ||
command |
yes |
|
Which operation do you want to perform. | |
description |
no | Description of the Block Storage volume. | ||
droplet_id |
no | The droplet id you want to operate on. Required when command=attach. | ||
region |
yes | The slug of the region where your Block Storage volume should be located in. | ||
state |
yes |
|
Indicate desired state of the target. | |
timeout |
no | 10 | The timeout in seconds used for polling DigitalOcean's API. | |
volume_name |
yes | The name of the Block Storage volume. |
# Create new Block Storage - digital_ocean_block_storage: state: present command: create api_token: <TOKEN> region: nyc1 block_size: 10 volume_name: nyc1-block-storage # Delete Block Storage - digital_ocean_block_storage: state: absent command: create api_token: <TOKEN> region: nyc1 volume_name: nyc1-block-storage # Attach Block Storage to a Droplet - digital_ocean_block_storage: state: present command: attach api_token: <TOKEN> volume_name: nyc1-block-storage region: nyc1 droplet_id: <ID> # Detach Block Storage from a Droplet - digital_ocean_block_storage: state: absent command: attach api_token: <TOKEN> volume_name: nyc1-block-storage region: nyc1 droplet_id: <ID>
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
id | Unique identifier of a Block Storage volume returned during creation. | changed | string | 69b25d9a-494c-12e6-a5af-001f53126b44 |
Note
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is community maintained without core committer oversight.
For more information on what this means please read Module Support
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.