Use the nios_fixed_address
module to configure, update, or remove a DHCP fixed IP address object from a NIOS Grid. A fixed address is a specific IP address that a DHCP server always assigns when a lease request comes from a particular MAC address of the client. The module supports configuring IPv4 and IPv6 addresses.
The following table describes the parameters you can define in the nios_fixed_address
module:
Parameter | Required/Optional | Description |
---|---|---|
name | Required | Specifies the host name with which the DHCP fixed IP address is stored for a particular MAC address. |
ip_addr | Required | Specifies the IPv6 or IPv4 address of the fixed address. |
mac | Required | Required for specifying an IPv4 address. It specifies the MAC address of the IPv4 interface. |
duid | Required | Required for specifying an IPv6 address. It specifies the DUID address of the IPv6 interface. |
network | Optional | Specifies the network range in which the specified IP address exists. |
network_view | Optional | Specifies the name of the network view to associate with this object instance. |
options | Optional | Defines the set of DHCP options to be included as part of
|
extattrs | Optional | Specifies extensible attributes for the DHCP fixed address object. |
state | Optional | Specifies the state of the DHCP fixed address instance in NIOS.
|
comment | Optional | Describes the DHCP fixed IP address object. |
| Required | Defines the details of the connection:
For information on additional fields you can define, see the list of subparameters. |
connection | Required | The nios_fixed_address module must be run locally. |
Examples
name: Configure an ipv4 dhcp fixed address
infoblox.nios_modules.nios_fixed_address:
name: ipv4_fixed
ipaddr: 192.168.10.1
mac: 08:6d:41:e8:fd:e8
network: 192.168.10.0/24
network_view: default
comment: this is a test comment state: present
provider:
host: <nios_hostname_or_hostip>
username: <nios_username>
password: <nios_password>connection: local
name: Configure an ipv6 dhcp fixed address
infoblox.nios_modules.nios_fixed_address:
name: ipv6_fixed
ipaddr: fe80::1/10
mac: 08:6d:41:e8:fd:e8
network: fe80::/64
network_view: default
comment: this is a test comment state: absent
provider:
host: host: <nios_hostname_or_hostip>
username: <nios_username>
password: <nios_password>connection: local
name: Set dhcp options for an ipv4 fixed address
infoblox.nios_modules.nios_fixed_address:
name: ipv4_fixed
ipaddr: 192.168.10.1
mac: 08:6d:41:e8:fd:e8
network: 192.168.10.0/24
network_view: default
comment: this is a test comment
options:
- name: domain-name
value: ansible.com state: present
provider:
host: host: <nios_hostname_or_hostip>
username: <nios_username>
password: <nios_password>connection: local