community.general.profitbricks_volume (8.5.0) — module

Create or destroy a volume

Authors: Matt Baldwin (@baldwinSPC) <baldwin@stackpointcloud.com>

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Allows you to create or remove a volume from a ProfitBricks datacenter. This module has a dependency on profitbricks >= 1.0.0


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create multiple volumes
  community.general.profitbricks_volume:
    datacenter: Tardis One
    name: vol%02d
    count: 5
    auto_increment: true
    wait_timeout: 500
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove Volumes
  community.general.profitbricks_volume:
    datacenter: Tardis One
    instance_ids:
      - 'vol01'
      - 'vol02'
    wait_timeout: 500
    state: absent

Inputs

    
bus:
    choices:
    - IDE
    - VIRTIO
    default: VIRTIO
    description:
    - The bus type.
    required: false
    type: str

name:
    description:
    - The name of the volumes. You can enumerate the names using auto_increment.
    type: str

size:
    default: 10
    description:
    - The size of the volume.
    required: false
    type: int

wait:
    default: true
    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
    type: int

image:
    description:
    - The system image ID for the volume, e.g. a3eae284-a2fe-11e4-b187-5f1f641608c8. This
      can also be a snapshot image ID.
    type: str

state:
    default: present
    description:
    - create or terminate datacenters
    - 'The available choices are: V(present), V(absent).'
    required: false
    type: str

server:
    description:
    - Server name to attach the volume to.
    type: str

ssh_keys:
    default: []
    description:
    - Public SSH keys allowing access to the virtual machine.
    elements: str
    type: list

disk_type:
    choices:
    - HDD
    - SSD
    default: HDD
    description:
    - The disk type of the volume.
    required: false
    type: str

datacenter:
    description:
    - The datacenter in which to create the volumes.
    type: str

instance_ids:
    default: []
    description:
    - list of instance ids, currently only used when state='absent' to remove instances.
    elements: str
    type: list

licence_type:
    default: UNKNOWN
    description:
    - The licence type for the volume. This is used when the image is non-standard.
    - 'The available choices are: V(LINUX), V(WINDOWS), V(UNKNOWN), V(OTHER).'
    required: false
    type: str

wait_timeout:
    default: 600
    description:
    - how long before wait gives up, in seconds
    type: int

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
    type: str

subscription_user:
    description:
    - The ProfitBricks username. Overrides the PB_SUBSCRIPTION_ID environment variable.
    required: false
    type: str

subscription_password:
    description:
    - THe ProfitBricks password. Overrides the PB_PASSWORD environment variable.
    required: false
    type: str