/
DNS Zone

DNS Zone

Use the nios_zone module to create, update, or remove a DNS zone object from a NIOS Grid.

The following table describes the parameters you can define in the nios_zone module:

Parameter

Required/Optional

Description

Parameter

Required/Optional

Description

name/fqdn

Required

Specifies the fully qualified host name to add, update, or remove from NIOS.

view

Optional

Specifies the DNS view to associate the zone with.
If a value is not specified, the default view configured in NIOS is used.

grid_primary

Optional

Specifies the primary server of the Grid for this zone. Configure the name of the Grid primary server as the subparameter.

grid_secondaries

Optional

Specifies the secondary server of the Grid for this zone. Configure the name of the Grid secondary server as the subparameter.

ns_group

Optional

Specifies the name server group for this zone.
The name server group is mutually exclusive with the primary and secondary servers of the Grid.

restart_if_needed

Optional

Setting this parameter to true, causes the NIOS DNS service to restart and load the new zone configuration.

zone_format

Optional

Creates an authoritative reverse-mapping zone, which is an area of the network space for which one or more primary and secondary name servers respond to the address-to-name queries.
It supports reverse-mapping zones for IPv4 as well as IPv6 addresses. The default value is FORWARD.

extattrs

Optional

Specifies extensible attributes for the zone object.

state

Optional

Specifies the state of the DNS zone instance on the NIOS server.
Set one of the following values:

  • present (default): Configures the record.

  • absent: Removes the record.

comment

Optional

Describes the DNS zone object.

provider

Required

Defines the details of the connection:

  • host: The DNS host name or IP address to connect to the remote instance of NIOS.

  • username: The user name to use for authenticating the connection to the remote instance.

  • password: The password to use for authenticating the connection to the remote instance.

For information on additional fields you can define, see the list of subparameters in the NIOS Modules for Ansible Collections topic.

connection

Required

The nios_zone module must be run locally.

Examples

name:Configure a zone on the system using grid primary and secondaries
infoblox.nios_modules.nios_zone:
  name: ansible.com
  grid_primary:
   - name: gridprimary.grid.com
  grid_secondaries:
   - name: gridsecondary1.grid.com
   - name: gridsecondary2.grid.com
  restart_if_needed: true 
  state: present
  provider:
    host: <nios_hostname_or_hostip>
    username: <nios_username>
    password: <nios_password>
connection: local

 

name:Configure a zone on the system using a name server group
infoblox.nios_modules.nios_zone:
  name: ansible.com
  ns_group: examplensg
  restart_if_needed: true  
  state: present
  provider:
    host: <nios_hostname_or_hostip>
    username: <nios_username>
    password: <nios_password>
connection: local

Related content