community.general.nios_next_network – Return the next available network range for a network-container¶
Note
This plugin is part of the community.general collection (version 2.5.1).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.nios_next_network
.
Synopsis¶
Uses the Infoblox WAPI API to return the next available network addresses for a given network CIDR
Requirements¶
The below requirements are needed on the local controller 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 Guide for more detailed information on how to use Infoblox with Ansible.
Examples¶
- name: return next available network for network-container 192.168.10.0/24
ansible.builtin.set_fact:
networkaddr: "{{ lookup('community.general.nios_next_network', '192.168.10.0/24', cidr=25,
provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}"
- name: return the next 2 available network addresses for network-container 192.168.10.0/24
ansible.builtin.set_fact:
networkaddr: "{{ lookup('community.general.nios_next_network', '192.168.10.0/24', cidr=25, num=2,
provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}"
- name: return the available network addresses for network-container 192.168.10.0/24 excluding network range '192.168.10.0/25'
ansible.builtin.set_fact:
networkaddr: "{{ lookup('community.general.nios_next_network', '192.168.10.0/24', cidr=25, exclude=['192.168.10.0/25'],
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
/ elements=string
|
success |
The list of next network addresses available
|
Authors¶
Unknown (!UNKNOWN)