nios_next_ip – Return the next available IP address for a network¶
New in version 2.5.
Synopsis¶
- Uses the Infoblox WAPI API to return the next available IP addresses for a given network CIDR
Requirements¶
The below requirements are needed on the local master node that executes this lookup.
- infoblox-client
Parameters¶
Notes¶
Note
- This module must be run locally, which can be achieved by specifying
connection: local
. - Please read the Infoblox ガイド for more detailed information on how to use Infoblox with Ansible.
Examples¶
- name: return next available IP address for network 192.168.10.0/24
set_fact:
ipaddr: "{{ lookup('nios_next_ip', '192.168.10.0/24', provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}"
- name: return the next 3 available IP addresses for network 192.168.10.0/24
set_fact:
ipaddr: "{{ lookup('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']
set_fact:
ipaddr: "{{ lookup('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'}) }}"
Return Values¶
Common return values are documented here, the following are the fields unique to this lookup:
Key | Returned | Description |
---|---|---|
_list
list
|
always |
The list of next IP addresses available
|
Status¶
- This lookup is not guaranteed to have a backwards compatible interface. [preview]
- This lookup is maintained by the Ansible Community. [community]
Authors¶
- UNKNOWN
Hint
If you notice any issues in this documentation, you can edit this document to improve it.
Hint
Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.