community / community.general / 0.1.1 / module / profitbricks_volume Create or destroy a volume. Authors: Matt Baldwin (@baldwinSPC) <baldwin@stackpointcloud.com> preview | supported by communitycommunity.general.profitbricks_volume (0.1.1) — module
Install with ansible-galaxy collection install community.general:==0.1.1
collections: - name: community.general version: 0.1.1
Allows you to create or remove a volume from a ProfitBricks datacenter. This module has a dependency on profitbricks >= 1.0.0
# 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
bus: choices: - IDE - VIRTIO default: VIRTIO description: - The bus type. required: false name: description: - The name of the volumes. You can enumerate the names using auto_increment. required: true size: default: 10 description: - The size of the volume. required: false wait: default: 'yes' description: - wait for the datacenter to be created before returning required: false type: bool count: default: 1 description: - The number of volumes you wish to create. required: false image: description: - The system image ID for the volume, e.g. a3eae284-a2fe-11e4-b187-5f1f641608c8. This can also be a snapshot image ID. required: true state: choices: - present - absent default: present description: - create or terminate datacenters required: false ssh_keys: description: - Public SSH keys allowing access to the virtual machine. required: false disk_type: choices: - HDD - SSD default: HDD description: - The disk type of the volume. required: false datacenter: description: - The datacenter in which to create the volumes. required: true instance_ids: description: - list of instance ids, currently only used when state='absent' to remove instances. required: false licence_type: choices: - LINUX - WINDOWS - UNKNOWN - OTHER default: UNKNOWN description: - The licence type for the volume. This is used when the image is non-standard. required: false wait_timeout: default: 600 description: - how long before wait gives up, in seconds auto_increment: default: true description: - Whether or not to increment a single number in the name for created virtual machines. type: bool image_password: description: - Password set for the administrative user. required: false subscription_user: description: - The ProfitBricks username. Overrides the PB_SUBSCRIPTION_ID environment variable. required: false subscription_password: description: - THe ProfitBricks password. Overrides the PB_PASSWORD environment variable. required: false