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

Attach or detach 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 attach or detach a volume from a ProfitBricks server. This module has a dependency on profitbricks >= 1.0.0


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.

# Attach a Volume

- profitbricks_volume_attachments:
    datacenter: Tardis One
    server: node002
    volume: vol01
    wait_timeout: 500
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Detach a Volume

- profitbricks_volume_attachments:
    datacenter: Tardis One
    server: node002
    volume: vol01
    wait_timeout: 500
    state: absent

Inputs

    
wait:
    default: 'yes'
    description:
    - wait for the operation to complete before returning
    required: false
    type: bool

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Indicate desired state of the resource
    required: false

server:
    description:
    - The name of the server you wish to detach or attach the volume.
    required: true

volume:
    description:
    - The volume name or ID.
    required: true

datacenter:
    description:
    - The datacenter in which to operate.
    required: true

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

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