community.general.dimensiondata_network (8.5.0) — module

Create, update, and delete MCP 1.0 & 2.0 networks

Authors: Aimon Bustardo (@aimonb)

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

Create, update, and delete MCP 1.0 & 2.0 networks

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create an MCP 1.0 network
  community.general.dimensiondata_network:
    region: na
    location: NA5
    name: mynet
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create an MCP 2.0 network
  community.general.dimensiondata_network:
    region: na
    mcp_user: my_user
    mcp_password: my_password
    location: NA9
    name: mynet
    service_plan: ADVANCED
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete a network
  community.general.dimensiondata_network:
    region: na
    location: NA1
    name: mynet
    state: absent

Inputs

    
name:
    description:
    - The name of the network domain to create.
    required: true
    type: str

wait:
    default: false
    description:
    - Should we wait for the task to complete before moving onto the next.
    type: bool

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Should the resource be present or absent.
    type: str

region:
    default: na
    description:
    - The target region.
    - Regions are defined in Apache libcloud project [libcloud/common/dimensiondata.py].
    - They are also listed in U(https://libcloud.readthedocs.io/en/latest/compute/drivers/dimensiondata.html).
    - Note that the default value C(na) stands for "North America".
    - The module prepends C(dd-) to the region choice.
    type: str

location:
    description:
    - The target datacenter.
    required: true
    type: str

mcp_user:
    description:
    - The username used to authenticate to the CloudControl API.
    - If not specified, will fall back to E(MCP_USER) from environment variable or C(~/.dimensiondata).
    type: str

wait_time:
    default: 600
    description:
    - The maximum amount of time (in seconds) to wait for the task to complete.
    - Only applicable if O(wait=true).
    type: int

description:
    description:
    - Additional description of the network domain.
    required: false
    type: str

mcp_password:
    description:
    - The password used to authenticate to the CloudControl API.
    - If not specified, will fall back to E(MCP_PASSWORD) from environment variable or
      C(~/.dimensiondata).
    - Required if O(mcp_user) is specified.
    type: str

service_plan:
    choices:
    - ESSENTIALS
    - ADVANCED
    default: ESSENTIALS
    description:
    - The service plan, either "ESSENTIALS" or "ADVANCED".
    - MCP 2.0 Only.
    type: str

validate_certs:
    default: true
    description:
    - If V(false), SSL certificates will not be validated.
    - This should only be used on private instances of the CloudControl API that use self-signed
      certificates.
    type: bool

wait_poll_interval:
    default: 2
    description:
    - The amount of time (in seconds) to wait between checks for task completion.
    - Only applicable if O(wait=true).
    type: int

Outputs

network:
  contains:
    description:
      description: Network description.
      sample: My network description
      type: str
    id:
      description: Network ID.
      sample: 8c787000-a000-4050-a215-280893411a7d
      type: str
    location:
      description: Datacenter location.
      sample: NA3
      type: str
    multicast:
      description: Multicast enabled? (MCP 1.0 only)
      sample: false
      type: bool
    name:
      description: Network name.
      sample: My network
      type: str
    private_net:
      description: Private network subnet. (MCP 1.0 only)
      sample: 10.2.3.0
      type: str
    status:
      description: Network status. (MCP 2.0 only)
      sample: NORMAL
      type: str
  description: Dictionary describing the network.
  returned: On success when O(state=present).
  type: complex