nttmcp / nttmcp.mcp / 1.0.9 / module / ipam_public IP Address Management | "added in version" 2.10.0 of nttmcp.mcp" Authors: Ken Sinfield (@kensinfield) preview | supported by NTT Ltd.nttmcp.mcp.ipam_public (1.0.9) — module
Install with ansible-galaxy collection install nttmcp.mcp:==1.0.9
collections: - name: nttmcp.mcp version: 1.0.9
IP Address Management
- hosts: 127.0.0.1 connection: local collections: - nttmcp.mcp tasks: - name: Get the next free public IPv4 address ipam_public: region: na datacenter: NA12 network_domain: myCND state: present - name: Allocate a new /31 block ipam_public: region: na datacenter: NA12 network_domain: myCND next_free_public_ipv4: False state: present - name: Delete a public IPv4 block by IP address ipam_public: region: na datacenter: NA12 network_domain: myCND ip_address: x.x.x.x state: absent - name: Delete a public IPv4 block by UUID ipam_public: region: na datacenter: NA12 network_domain: myCND id: ffffffff-fff-ffff-ffff-ffffffffffff state: absent
id: description: - The UUID of the /31 public IPv4 block - Only used for deleting a /31 public IPv4 block required: false type: str 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 datacenter: description: - The datacenter name required: true type: str ip_address: description: - Any of the IPv4 addresses within the /31 public IPv4 block - Only used for deleting a /31 public IPv4 block required: false type: str network_domain: description: - The name of a Cloud Network Domain required: true type: str next_free_public_ipv4: default: true description: - Return the next available public IPv4 address - If all existing /31 public IPv4 blocks are used, a new /31 will be provisioned - If a new /31 is required this should be set to false required: false type: bool
data: contains: block: description: List of Public IPv4 addresses within the new block returned: when next_free_public_ipv4 == False sample: - 10.0.0.10 type: list id: description: UUID of the public IPv4 block if allocating public IPv4 returned: when next_free_public_ipv4 == False sample: b2fbd7e6-ddbb-4eb6-a2dd-ad048bc5b9ae type: str ip: description: The Public IPv4 address returned: when next_free_public_ipv4 == True (Default) sample: 10.0.0.10 type: str description: IP address object returned: success type: complex