Versions Compared

Key

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

...

Parameter

Required/Optional

Description

name

Required

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

To update the name of an A record object, define a dictionary object that contains the following parameters:

  • old_name: Specifies the existing name that must be changed.

  • new_name: Specifies the new name.

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 usedis used as the DNS view name.
If you are using a custom DNS view, then you must specify this parameter.

ipv4addr/
ipv4

Required

Specifies the IPv4 address for the an A record.

  • To allocate a dynamic IP address the A record, define a dictionary object that contains the nios_next_ip

and CIDR networkrange parameters.
  • parameter.

  • To update an A record with a static IP address, define a dictionary object that contains the following parameters:

    • old_ipv4addr: Specifies the IP address that must be changed.

    • new_ipv4addr: Specifies the new IP address.

  • To update an A record with a dynamic IP address, define a dictionary object that contains the old_ipv4addr and nios_next_ip parameters.
    Example:
    ipv4: {'old_ipv4addr': '10.0.0.5', nios_next_ip: 80.0.0.0/24}

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 in the NIOS Modules for Ansible Collections topic.

connection

Required

The nios_a_record module must be run locally.

...

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 Create Nios A record in custom DNS view
infoblox.nios_modules.nios_a_record:
name: v56.parent.com
view: custom_view
ipv4: {nios_next_ip: "192.170.10.0/24"}
comment: Created with Ansible
state: present
provider:
    host: <nios_hostname_or_hostip>
    username: <nios_username>
    password: <nios_password>
connection: local

name: Update an A record in custom view with a dynamic IP using nios_next_ip
infoblox.nios_modules.nios_a_record:
  name: a test.ansibletestzoneparent.com
  view: default.custom
ipv4: {'old_ipv4addr': '10.0.0.5', nios_next_ip: 19280.1680.100.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: Update an A record with a static IP
infoblox.nios_modules.nios_a_record:
name: test.parent.com
ipv4: {'old_ipv4addr': 30.0.0.10, 'new_ipv4addr': 37.0.0.10}
state: present
provider:
    host: <nios_hostname_or_hostip>
    username: <nios_username>
    password: <nios_password>
connection: local

name: Update host name of an A record
infoblox.nios_modules.nios_a_record:
name: {new_name: a_new.ansible.com, old_name: a.ansible.com}
ipv4: 192.168.10.1
state: present
provider:
    host: <nios_hostname_or_hostip>
    username: <nios_username>
    password: <nios_password>
connection: local