community / community.general / 0.1.1 / module / infinity Manage Infinity IPAM using Rest API Authors: Meirong Liu (@MeganLiu) preview | supported by communitycommunity.general.infinity (0.1.1) — module
Install with ansible-galaxy collection install community.general:==0.1.1
collections: - name: community.general version: 0.1.1
Manage Infinity IPAM using REST API.
--- - hosts: localhost connection: local strategy: debug tasks: - name: Reserve network into Infinity IPAM infinity: server_ip: 80.75.107.12 username: username password: password action: reserve_network network_name: reserve_new_ansible_network network_family: 4 network_type: lan network_id: 1201 network_size: /28 register: infinity
action: choices: - add_network - delete_network - get_network - get_network_id - release_ip - release_network - reserve_network - reserve_next_available_ip description: - Action to perform required: true type: str password: description: - Infinity password. required: true type: str username: description: - Username to access Infinity. - The user must have REST API privileges. required: true type: str server_ip: description: - Infinity server_ip with IP address. required: true type: str ip_address: default: '' description: - IP Address for a reservation or a release. type: str network_id: default: '' description: - Network ID. type: str network_name: default: '' description: - The name of a network. type: str network_size: default: '' description: - Network bitmask (e.g. 255.255.255.220) or CIDR format (e.g., /26). type: str network_type: choices: - lan - shared_lan - supernet default: lan description: - Network type defined by Infinity type: str network_family: choices: - 4 - 6 - dual default: 4 description: - Network family defined by Infinity, e.g. IPv4, IPv6 and Dual stack type: str network_address: default: '' description: - Network address with CIDR format (e.g., 192.168.310.0). type: str network_location: default: -1 description: - The parent network id for a given network. type: int
ip_info: description: when reserve next available ip address from a network, the ip address info ) is returned. returned: success sample: '{"address": "192.168.10.3", "hostname": "", "FQDN": "", "domainname": "", "id": 3229}' type: str network_id: description: id for a given network returned: success sample: '1501' type: str network_info: description: when reserving a LAN network from a Infinity supernet by providing network_size, the information about the reserved network is returned. returned: success sample: description: null network_address: 192.168.10.32/28 network_family: '4' network_id: 3102 network_location: '3085' network_name: '''reserve_new_ansible_network''' network_size: null network_type: lan ranges: first_ip: null id: 0 last_ip: null name: null type: null type: str