nttmcp.mcp.ipam_reserve (1.0.9) — module

Reserve an IP Address in IP Address Management

| "added in version" 2.10.0 of nttmcp.mcp"

Authors: Ken Sinfield (@kensinfield)

preview | supported by NTT Ltd.

Install collection

Install with ansible-galaxy collection install nttmcp.mcp:==1.0.9


Add to requirements.yml

  collections:
    - name: nttmcp.mcp
      version: 1.0.9

Description

Reserve an IP Address in IP Address Management


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- hosts: 127.0.0.1
  connection: local
  collections:
    - nttmcp.mcp
  tasks:

  - name: Reserve and IPv4 address
    ipam_reserve:
      region: na
      datacenter: NA12
      network_domain: myCND
      vlan: myVLAN
      ip_address: 10.1.77.100
      state: present

  - name: Reserve and IPv6 address
    ipam_reserve:
      region: na
      datacenter: NA12
      network_domain: myCND
      vlan: myVLAN
      ip_address: ffff::1111
      state: present

  - name: Unreserve and IPv4 address
    ipam_reserve:
      region: na
      datacenter: NA12
      network_domain: myCND
      vlan: myVLAN
      ip_address: 10.1.77.100
      state: absent

Inputs

    
auth:
    description:
    - Optional dictionary containing the authentication and API information for Cloud
      Control
    required: false
    suboptions:
      api:
        description:
        - The Cloud Control API endpoint e.g. api-na.mcp-services.net
        required: false
        type: str
      api_version:
        description:
        - The Cloud Control API version e.g. 2.11
        required: false
        type: str
      password:
        description:
        - The Cloud Control API user password
        required: false
        type: str
      username:
        description:
        - The Cloud Control API username
        required: false
        type: str
    type: dict

vlan:
    description:
    - The name of a VLAN
    required: true
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - The action to be performed
    required: false
    type: str

region:
    default: na
    description:
    - The geographical region
    required: false
    type: str

datacenter:
    description:
    - The datacenter name
    required: true
    type: str

ip_address:
    description:
    - An IPv4 or IPv6 address
    required: true
    type: str

description:
    description:
    - The description of the Cloud Network Domain
    required: false
    type: str

network_domain:
    description:
    - The name of a Cloud Network Domain
    required: true
    type: str

Outputs

data:
  contains:
    datacenterId:
      description: UUID of the datacenter/MCP
      returned: when state == present
      sample: N"b2fbd7e6-ddbb-4eb6-a2dd-ad048bc5b9ae"
      type: str
    exclusive:
      description: Is this an explicity reservation
      returned: when state == present
      type: bool
    id:
      description: UUID of the public IPv4 block if allocating public IPv4
      returned: when state == present
      sample: b2fbd7e6-ddbb-4eb6-a2dd-ad048bc5b9ae
      type: str
    ipAddress:
      description: The IPv4/IPv6 IP address
      returned: when state == present
      sample: 10.0.0.10
      type: str
    vlanId:
      description: UUID of the VLAN
      returned: when state == present
      sample: b2fbd7e6-ddbb-4eb6-a2dd-ad048bc5b9ae
      type: str
  description: IP address object
  returned: success
  type: complex