/
SRV Record

SRV Record

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

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

Parameter

Required/Optional

Description

Parameter

Required/Optional

Description

name

Required

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

To update the name of an SRV 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.

view

Optional

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

port

Optional

Specifies the port of this SRV record.
The valid values are in the range of 0 to 65535 (inclusive) that are formatted as 32-bit unsigned integers.

priority

Optional

Specifies the priority for this SRV record.
The valid values are in the range of 0 to 65535 (inclusive) that are formatted as 32-bit unsigned integers.

target

Optional

Specifies the target FQDN for this SRV record.

weight

Optional

Specifies the weight for this SRV record.
The valid values are in the range of 0 to 65535 (inclusive) that are formatted as 32-bit unsigned integers.

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 extensible attributes for the SRV record object.

state

Optional

Specifies the state of the SRV 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 SRV 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_srv_record module must be run locally.

Note

When creating an SRV record, you must specify values for the name, port, priority, target, and weight parameters.

Examples

name: Configure an SRV record
infoblox.nios_modules.nios_srv_record:
  name: sip. tcp.service.ansible.com
  port: 5080
  priority: 10
  target: service1.ansible.com
  weight: 10
  state: present
  provider:
    host: <nios_hostname_or_hostip>
    username: <nios_username>
    password: <nios_password>
connection: local

name: Update the name of an SRV record
infoblox.nios_modules.nios_srv_record:
name: {old_name: _sip._tcp.service.ansible.com, new_name: _sip._udp.service.ansible.com}
port: 5080
priority: 10
target: service1.ansible.com
weight: 10
state: present
provider:
    host: <nios_hostname_or_hostip>
    username: <nios_username>
    password: <nios_password>
connection: local

Related content