community.general.profitbricks_volume_attachments (8.5.0) — module

Attach or detach 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 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.
- name: Attach a volume
  community.general.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.
- name: Detach a volume
  community.general.profitbricks_volume_attachments:
    datacenter: Tardis One
    server: node002
    volume: vol01
    wait_timeout: 500
    state: absent

Inputs

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

state:
    default: present
    description:
    - Indicate desired state of the resource
    - 'The available choices are: V(present), V(absent).'
    required: false
    type: str

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

volume:
    description:
    - The volume name or ID.
    type: str

datacenter:
    description:
    - The datacenter in which to operate.
    type: str

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

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