NIOS Next VLAN ID
Use the nios_next_vlan_id
plug-in to fetch the next available VLAN ID for a specified VLAN view or range. The plug-in uses the Infoblox WAPI to return the VLAN ID.
The following table describes the parameters you can define in the nios_next_vlan_id
plug-in:
Parameter | Required/Optional | Description |
---|---|---|
| Optional | Specifies the VLAN view or range to retrieve the ID from. |
| Optional | Specifies the number of VLAN IDs to return. The default value is |
| Optional | Specifies the list of VLAN IDs to be excluded from the returned VLAN IDs. |
| Required | Defines the details of the connection:
For information on additional fields you can define, see the list of subparameters in the NIOS Modules for Ansible Collections topic. |
| Required | The |
Examples
name: returns the next available VLAN ID from a VLAN view
ansible.builtin.set_fact:
networkaddr: "{{ lookup('infoblox.nios_modules.nios_next_vlan_id', parent='vlanview', provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}"
name: returns the next two available VLAN IDs from a VLAN range
ansible.builtin.set_fact:
networkaddr: "{{ lookup('infoblox.nios_modules.nios_next_vlan_id', parent='vlanrange', num=2,
provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}"
name: returns the next available VLAN ID, excluding IDs 1-3
ansible.builtin.set_fact:
networkaddr: "{{ lookup('infoblox.nios_modules.nios_next_vlan_id', parent='vlanrange', exclude=[1,2,3],
provider={'host': 'nios01', 'username': 'admin', 'password': 'password'}) }}"