community.general.profitbricks_datacenter (0.2.1) — 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:==0.2.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.2.1

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
  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)
  profitbricks_datacenter:
    datacenter: Tardis One
    wait_timeout: 500
    state: absent

Inputs

    
name:
    description:
    - The name of the virtual datacenter.
    required: true

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

state:
    choices:
    - present
    - absent
    default: present
    description:
    - create or terminate datacenters
    required: false

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

description:
    description:
    - The description of the virtual datacenter.
    required: false

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