Often, the default disk available on the droplet might not be enough. For such scenarios, DigitalOcean provides a block storage service that can be attached to a droplet as an additional disk. This storage is highly available and easily extendable. Using Ansible, we can create and attach the block storage to a droplet.
Managing Block Storage
How to do it...
- Let's start by creating a 10 GB block. We have to specify the command, region, block_size, and volume_name. The authentication token is also required along with these details. Note that this task will only create the block but will not attach it to any of the droplets:
- digital_ocean_block_storage:
state: present
command: create
region: blr1
block_size...