...
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 |
---|---|---|
| Required | Specifies the fully qualified host name to add or remove from |
NIOS
NIOS. To update the name of an A record object, define a dictionary object that contains the following parameters:
| ||
| Optional | Sets the DNS view to associate the A record with. |
default |
is used as the DNS view name. | ||
| Required | Specifies the IPv4 address for |
an A record.
|
|
CIDR network
range
parameters.
| ||
| Optional | Specifies the Time To Live (TTL) value for the record. The duration that the record is valid for, in seconds (cached). |
| Optional | Specifies the extensible attributes for the A record object. |
| Optional | Specifies the state of the A record instance on the NIOS server. Set one of the following values:
|
| Optional | Describes the A record 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 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: 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:
dynamically add a record to the next available 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<nios_hostname_or_
hostip>hostip>
username:
<nios_username>
password: <nios_password> <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