community.general.profitbricks_datacenter (8.5.0) — module

Create or destroy a ProfitBricks Virtual Datacenter

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

This is a simple module that supports creating or removing vDCs. A vDC is required before you can create servers. 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 a datacenter
  community.general.profitbricks_datacenter:
    datacenter: Tardis One
    wait_timeout: 500
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Destroy a datacenter (remove all servers, volumes, and other objects in the datacenter)
  community.general.profitbricks_datacenter:
    datacenter: Tardis One
    wait_timeout: 500
    state: absent

Inputs

    
name:
    description:
    - The name of the virtual datacenter.
    type: str

wait:
    default: true
    description:
    - wait for the datacenter to be created before returning
    required: false
    type: bool

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

location:
    choices:
    - us/las
    - de/fra
    - de/fkb
    default: us/las
    description:
    - The datacenter location.
    required: false
    type: str

description:
    description:
    - The description of the virtual datacenter.
    required: false
    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