Network
Use the nios_network
module to create, update, or remove a network object from a NIOS Grid. It supports IPv4 as well as IPv6 networks.
The following table describes the parameters you can define in the nios_network
module:
Parameter | Required/Optional | Description |
---|---|---|
| Required | Specifies the name of the network to add, update, or remove from NIOS. |
| Optional | Specifies the network view to associate the instance of the network object with. |
| Optional | Specifies the set of DHCP options to be included as part of the configured network instance.
|
| Optional | Determines whether a network container must be created. |
| Optional | Specifies whether the network must be created according to the values specified in the selected template. |
| Optional | Specifies the set of VLANs that is included as part of the configured network instance. This parameter accepts a list of sub parameters of which, you must configure at least one of the
Note: This parameter is not supported for network container objects. |
| Optional | Assigns NIOS members to the network instance.
|
| Optional | Specifies whether the logic filter must be used. |
| Optional | Defines the logic filters that must be applied on this instance of the network object.
To use the defined logic filters, you must set the |
| Optional | Specifies extensible attributes for the network object. |
| Optional | Specifies the state of the network instance on the NIOS server.
|
| Optional | Describes the network object. |
| 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: Configure an IPv4 network
infoblox.nios_modules.nios_network:
network: 192.0.2.0/24
comment: this is a test comment
state: present
provider:
host: <nios_hostname_or_hostip>
username: <nios_username>
password: <nios_password>
connection: local
name: Set dhcp options for a network ipv4
infoblox.nios_modules.nios_network:
network: 192.0.2.0/24
comment: this is a test comment
options:
- name: domain-name
- value: ansible.com
state: present
provider:
host: <nios_hostname_or_hostip>
username: <nios_username>
password: <nios_password>
connection: local
name: Configure an ipv6 network container
infoblox.nios_modules.nios_network:
network: fe80::/64
container: true
comment: test network container
options:
- name: domain-name
- value: ansible.com
state: present
provider:
host: <nios_hostname_or_hostip>
username: <nios_username>
password: <nios_password>
connection: local
name: Create an ipv4 network with members assigned
infoblox.nios_modules.nios_network:
network: 192.0.2.0/24
comment: This is a test comment
members:
- name: member1.infoblox
- name: member2.infoblox
state: present
provider:
host: <nios_hostname_or_hostip>
username: <nios_username>
password: <nios_password>
connection: local
name: Remove assigned members from an ipv4 network
infoblox.nios_modules.nios_network:
network: 192.0.2.0/24
comment: This is a test comment
state: present
provider:
host: <nios_hostname_or_hostip>
username: <nios_username>
password: <nios_password>
connection: local
name: Set filters for a network ipv4
infoblox.nios_modules.nios_network:
network: 192.0.2.0/24
comment: this is a test comment
use_logic_filter_rules: true
logic_filter_rules:
- filter: PXE-UEFI
- type: Option
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
name: Configure an IPv4 network and assign vlans
infoblox.nios_modules.nios_network:
network: 192.0.2.0/24
comment: this is a test comment
vlans:
- name: ansiblevlan
parent: ansiblevlanview
id: 10
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local