ansible / ansible.builtin / v2.6.17 / module / infinity manage Infinity IPAM using Rest API | "added in version" 2.4 of ansible.builtin" Authors: Meirong Liu preview | supported by communityansible.builtin.infinity (v2.6.17) — module
pip
Install with pip install ansible==2.6.17
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: - reserve_next_available_ip - release_ip - delete_network - add_network - reserve_network - release_network - get_network_id description: - Action to perform required: true password: description: - Infinity password required: true username: description: - Username to access Infinity - The user must have Rest API privileges required: true server_ip: description: - Infinity server_ip with IP address required: true ip_address: default: '' description: - IP Address for a reservation or a release network_id: default: '' description: - Network ID network_name: default: '' description: - The name of a network network_size: default: '' description: - Network bitmask (e.g. 255.255.255.220) or CIDR format (e.g., /26) network_type: choices: - lan - shared_lan - supernet default: lan description: - Network type defined by Infinity network_family: choices: - 4 - 6 - dual default: '4' description: - Network family defined by Infinity, e.g. IPv4, IPv6 and Dual stack network_address: default: '' description: - Network address with CIDR format (e.g., 192.168.310.0) required: false network_location: default: -1 description: - the parent network id for a given network
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: string network_id: description: id for a given network returned: success sample: '1501' type: string 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: string