nttmcp.mcp.server_antiaffinity_info (1.0.9) — module

Get and List Server Anti-Affinity Groups

| "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

Get and List Server Anti-Affinity Groups

Currently servers can only belong to a single Anti-Affinity Group

https://docs.mcp-services.net/x/YgIu


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: List all Anti-Affinity Groups in a Network Domain
    server_antiaffinity_info:
      region: na
      datacenter: NA9
      network_domain: my_cnd

  - name: List all Anti-Affinity Groups for a specific server
    server_antiaffinity_info:
      region: na
      datacenter: NA9
      network_domain: my_cnd
      servers:
        - my_server_01

  - name: List all Anti-Affinity Groups for a specific server pair
    server_antiaffinity_info:
      region: na
      datacenter: NA9
      network_domain: my_cnd
      servers:
        - my_server_01
        - my_server_02

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

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

servers:
    description:
    - List of server names to search for
    elements: str
    required: false
    type: list

datacenter:
    description:
    - The datacenter name e.g NA9
    required: true
    type: str

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

Outputs

data:
  contains:
    antiaffinity:
      contains:
        createTime:
          description: The creation date of the Anti-Affinity Group
          sample: '2019-01-14T11:12:31.000Z'
          type: str
        datacenterId:
          description: Datacenter ID/location
          sample: NA9
          type: str
        id:
          description: Anti-Affinity Group ID
          sample: b2fbd7e6-ddbb-4eb6-a2dd-ad048bc5b9ae
          type: str
        server:
          contains:
            id:
              description: Server ID
              sample: b2fbd7e6-ddbb-4eb6-a2dd-ad048bc5b9ae
              type: str
            name:
              description: Server name
              sample: my_server_01
              type: str
            networkInfo:
              contains:
                networkDomainId:
                  description: The UUID of the Cloud Network Domain for this server
                  sample: b2fbd7e6-ddbb-4eb6-a2dd-ad048bc5b9ae
                  type: str
                networkDomainName:
                  description: The name of the Cloud Network Domain for this server
                  sample: my_cnd
                  type: str
                primary_nic:
                  contains:
                    ipv6:
                      description: The IPv6 address of the NIC
                      sample: fc00::100
                      type: str
                    macAddress:
                      description: The MAC address of the NIC
                      sample: aa:aa:aa:aa:aa:aa
                      type: str
                    privateIpv4:
                      description: The IPv4 address of the NIC
                      sample: 10.0.0.100
                      type: str
                    vlanId:
                      description: The UUID of the VLAN for the NIC
                      sample: b2fbd7e6-ddbb-4eb6-a2dd-ad048bc5b9ae
                      type: str
                    vlanName:
                      description: The name of the VLAN for the NIC
                      sample: my_vlan
                      type: str
                  description: Information in the primary NIC for this server
                  type: complex
              description: Server network information
              type: complex
          description: List of server objects in the Anti-Affinity Group
          type: list
        state:
          description: Status of the Anti-Affinity Group
          sample: NORMAL
          type: str
      description: List of the Anti-Affinity Groups
      returned: success
      type: list
    count:
      description: The number of objects returned
      returned: success
      sample: 1
      type: int
  description: dict of returned Objects
  returned: success
  type: complex