infoblox.nios_modules.nios_next_network (1.6.1) — lookup

Return the next available network range for a network-container

| "added in version" 1.0.0 of infoblox.nios_modules"

Authors: unknown

Install collection

Install with ansible-galaxy collection install infoblox.nios_modules:==1.6.1


Add to requirements.yml

  collections:
    - name: infoblox.nios_modules
      version: 1.6.1

Description

Uses the Infoblox WAPI API to return the next available network addresses for a given network CIDR


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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': 'admin', 'password': 'password'}) }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: return next available network for network-container 192.168.10.0/24 in a non-default network view
  ansible.builtin.set_fact:
    networkaddr: "{{ lookup('infoblox.nios_modules.nios_next_network', '192.168.10.0/24', cidr=25, network_view='ansible'
                        provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: return the next 2 available network addresses 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, num=2,
                        provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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': 'admin', 'password': 'password'}) }}"

Inputs

    
num:
    default: 1
    description: The number of network addresses to return from network-container.
    required: false
    type: int

cidr:
    description:
    - The CIDR of the network to retrieve the next network from next available network
      within the specified container. Also, Requested CIDR must be specified and greater
      than the parent CIDR.
    required: true
    type: str

_terms:
    description: The CIDR network to retrieve the next network from next available network
      within the specified container.
    required: true
    type: str

exclude:
    default: ''
    description: Network addresses returned from network-container excluding list of user's
      input network range.
    elements: str
    required: false
    type: list

network_view:
    default: default
    description: The network view to retrieve the CIDR network from.
    required: false
    type: str

Outputs

_list:
  description:
  - The list of next network addresses available
  returned: always
  type: list