infoblox / infoblox.nios_modules / 1.6.1 / lookup / nios_next_ip Return the next available IP address for a network | "added in version" 1.0.0 of infoblox.nios_modules" Authors: unknowninfoblox.nios_modules.nios_next_ip (1.6.1) — lookup
Install with ansible-galaxy collection install infoblox.nios_modules:==1.6.1
collections: - name: infoblox.nios_modules version: 1.6.1
Uses the Infoblox WAPI API to return the next available IP addresses for a given network CIDR
- name: return next available IP address for network 192.168.10.0/24 ansible.builtin.set_fact: ipaddr: "{{ lookup('infoblox.nios_modules.nios_next_ip', '192.168.10.0/24', provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}"
- name: return next available IP address for network 192.168.10.0/24 in a non-default network view ansible.builtin.set_fact: ipaddr: "{{ lookup('infoblox.nios_modules.nios_next_ip', '192.168.10.0/24', network_view='ansible', provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}"
- name: return the next 3 available IP addresses for network 192.168.10.0/24 ansible.builtin.set_fact: ipaddr: "{{ lookup('infoblox.nios_modules.nios_next_ip', '192.168.10.0/24', num=3, provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}"
- name: return the next 3 available IP addresses for network 192.168.10.0/24 excluding ip addresses - ['192.168.10.1', '192.168.10.2'] ansible.builtin.set_fact: ipaddr: "{{ lookup('infoblox.nios_modules.nios_next_ip', '192.168.10.0/24', num=3, exclude=['192.168.10.1', '192.168.10.2'], provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}"
- name: return next available IP address for network fd30:f52:2:12::/64 ansible.builtin.set_fact: ipaddr: "{{ lookup('infoblox.nios_modules.nios_next_ip', 'fd30:f52:2:12::/64', provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}"
num: default: 1 description: The number of IP address(es) to return. required: false type: int _terms: description: The CIDR network to retrieve the next address(es) from. required: true type: str exclude: description: List of IP's that need to be excluded from returned IP addresses. elements: str required: false type: list network_view: default: default description: The network view to retrieve the CIDR network from. required: false type: str
_list: description: - The list of next IP addresses available returned: always type: list