/
NIOS Next Network

NIOS Next Network

Use the nios_next_network plug-in to fetch the next available network range for a network container. The plug-in uses Infoblox WAPI to return the available network addresses for a specified network CIDR.

The following table describes the parameters you can define in the nios_next_network plug-in:

Parameter

Required/Optional

Description

Parameter

Required/Optional

Description

terms

Required

Specifies the CIDR network to retrieve the next network from within the specified container.

cidr

Required

The CIDR of the network to retrieve the next network from the within the specified container. You must specify the requested CIDR and it must be greater than the parent CIDR. The default value is 24.

network_view

Optional

Specifies the network view from which to retrieve the next available network range.
If a value is not specified, the default network view configured in NIOS is used.

num

Optional

Specifies the number of network addresses to return from the network container. The default value is 1.

exclude

Optional

Specifies the network addresses returned from the network container excluding the list of network ranges that you input.

provider

Required

Defines the details of the connection:

  • host: The DNS host name or IP address to connect to the remote instance of NIOS.

  • username: The user name to use for authenticating the connection to the remote instance.

  • password: The password to use for authenticating the connection to the remote instance.

For information on additional fields you can define, see the list of subparameters in the NIOS Modules for Ansible Collections topic.

connection

Required

The nios_next_network module must be run locally.

Examples

name: return next available network for network-container 192.168.10.0/24
ansible.builtin.set_fact:
  networkaddr: "{{ lookup('infoblox.nios_modules.nios_next_network', '192.168.10.0/24', cidr=25,
            provider={'host': 'nios01', 'username': '<nios_username>', '<nios_password>': 'nios_password'}) }}"

name: return the available ipv6 network addresses for network-container 2001:1:111:1::0/64 set_fact:
networkaddr: "{{ lookup('infoblox.nios_modules.nios_next_network', '2001:1:111:1::0/64', cidr=126,
provider={'host': 'nios01', 'username': '<nios_username>', '<nios_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('infoblox.nios_modules.nios_next_network', '192.168.10.0/24', cidr=25, exclude=['192.168.10.0/25'],
            provider={'host': 'nios01', 'username': '<nios_username>', 'password': '<nios_password>'}) }}"