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 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
|
| 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 | Assigns NIOS members to the network instance.
|
| 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.168.10.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.168.10.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.168.10.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.168.10.0/24
comment: This is a test comment
state: present
provider:
host: <nios_hostname_or_hostip>
username: <nios_username>
password: <nios_password>
connection: local