ansible.builtin.profitbricks_volume (v2.9.27) — module

Create or destroy a volume.

| "added in version" 2.0 of ansible.builtin"

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

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

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.

# Create Multiple Volumes

- profitbricks_volume:
    datacenter: Tardis One
    name: vol%02d
    count: 5
    auto_increment: yes
    wait_timeout: 500
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Remove Volumes

- 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

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
    version_added: '2.2'
    version_added_collection: ansible.builtin

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
    version_added: '2.2'
    version_added_collection: ansible.builtin

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