nttmcp / nttmcp.mcp / 1.0.9 / module / server_antiaffinity Create, Update and Delete server Anti-Affinity Groups | "added in version" 2.10.0 of nttmcp.mcp" Authors: Ken Sinfield (@kensinfield) preview | supported by NTT Ltd.nttmcp.mcp.server_antiaffinity (1.0.9) — module
Install with ansible-galaxy collection install nttmcp.mcp:==1.0.9
collections: - name: nttmcp.mcp version: 1.0.9
Create, Update and Delete server Anti-Affinity Groups
Currently servers can only belong to a single Anti-Affinity Group
https://docs.mcp-services.net/x/YgIu
- hosts: 127.0.0.1 connection: local collections: - nttmcp.mcp tasks: - name: Create a Anti-Affinity Group server_antiaffinity: region: na datacenter: NA9 network_domain: my_cnd servers: - my_server_01 - my_server_02 - name: Delete a Anti-Affinity Group server_antiaffinity: region: na datacenter: NA9 network_domain: my_cnd servers: - my_server_01 - my_server_02 state: absent
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 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 servers: description: - List of server names to search for elements: str required: true 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: true type: str
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: state == present and success type: complex msg: description: Status message returned: state == absent or failure sample: The server anti-affinity group already exists type: str