Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Use the nios_a_record module to create, update, or remove an A record object from a NIOS Grid.

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

Parameter

Required/Optional

Description

name

Required

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

dns_view/view

Optional

Sets the DNS view to associate the A record with.
If a value is not specified, the default view configured in NIOS is used.

ipv4addr

Required

Specifies the IPv4 address for the A record.

To allocate a dynamic IP address, define

a dictionary

a dictionary object that contains the nios_next_ip and CIDR networkrange parameters.

ttl

Optional

Specifies the Time To Live (TTL) value for the record. The duration that the record is valid for, in seconds (cached).

extattrs

Optional

Specifies the extensible attributes for the A record object.

state

Optional

Specifies the state of the A record instance on the NIOS server. Set one of the following values:

  • present (default): Configures the record.

  • absent: Removes the record.

comment

Optional

Describes the A record 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

subparameters in the NIOS Modules for Ansible Collections topic.

connection

Required

The nios_a_record module must be run locally.


Examples

name:configure an A record
infoblox.nios_modules.nios_a_record:
  name: a.ansibletestzone.com
  ipv4: 192.168.10.1
  comment: this is a test comment
  state: present
  provider:
    host:

...

<nios_hostname_or_

...

hostip>
    username:

...

 <nios_

...

username>
    password:

...

 <nios_

...

password>
connection: local


name: dynamically add a record to the next available ip
infoblox.nios_modules.nios_a_record:
  name: a.ansibletestzone.com
  ipv4: {nios_next_ip: 192.168.10.0/24}
  comment: this is a test comment
  state: present
  provider:
    host: <nios<nios_hostname_or_hostip>hostip>
    username: <nios <nios_username>username>
    password: <nios <nios_password>password>
connection: local