effectivelywild.technitium_dns.technitium_dns_get_record module – Get DNS record(s)

Note

This module is part of the effectivelywild.technitium_dns collection (version 1.1.2).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install effectivelywild.technitium_dns.

To use it in a playbook, specify: effectivelywild.technitium_dns.technitium_dns_get_record.

New in effectivelywild.technitium_dns 0.1.0

Synopsis

  • Get DNS resource records from an authoritative zone.

Parameters

Parameter

Comments

api_port

integer

Port for the Technitium DNS API. Defaults to 5380.

Default: 5380

api_token

string / required

API token for authenticating with the Technitium DNS API.

api_url

string / required

Base URL for the Technitium DNS API

listZone

boolean

If true, list all records in the zone. If false, only records for the given domain.

Choices:

  • false ← (default)

  • true

name

aliases: domain

string / required

The record or zone name (e.g., test.example.com/example.com).

The use of ‘domain:’ is also supported to align with API.

node

string

The node domain name for which this API call is intended

When unspecified, the current node is used

This parameter can be used only when Clustering is initialized

validate_certs

boolean

Whether to validate SSL certificates when making API requests.

Choices:

  • false

  • true ← (default)

zone

string

The authoritative zone name (optional, defaults to closest match).

See Also

See also

effectivelywild.technitium_dns.technitium_dns_record

State-based management for DNS records

Examples

- name: Get specific record by name
  technitium_dns_get_records:
    api_url: "http://localhost"
    api_token: "myapitoken"
    port: 5380
    name: "record.example.com"

- name: Get all records for a zone
  technitium_dns_get_records:
    api_url: "http://localhost"
    api_token: "myapitoken"
    port: 5380
    name: "example.com"
    listZone: true
    validate_certs: false

- name: Get SOA and NS records for zone
  technitium_dns_get_records:
    api_url: "http://localhost"
    api_token: "myapitoken"
    port: 5380
    name: "example.com"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

api_response

dictionary

Complete raw API response from Technitium DNS

Returned: always

response

dictionary

The core data payload from the API

Returned: success

records

list / elements=string

Array of DNS record objects with complete details

Returned: success

disabled

boolean

Whether the record is disabled

Returned: always

dnssecStatus

string

DNSSEC status of the record

Returned: always

expiryTtl

integer

Record expiration TTL in seconds

Returned: always

expiryTtlString

string

Record expiration TTL as human-readable string

Returned: always

lastModified

string

When the record was last modified

Returned: always

lastUsedOn

string

When the record was last used

Returned: always

name

string

Full domain name of the record

Returned: always

rData

dictionary

Record-specific data (varies by record type)

Returned: always

Sample: {"ipAddress": "192.0.2.1"}

ttl

integer

Record TTL in seconds

Returned: always

ttlString

string

Record TTL as human-readable string

Returned: always

type

string

DNS record type

Returned: always

zone

dictionary

Information about the zone containing the records

Returned: always

catalog

string

Zone catalog information

Returned: always

disabled

boolean

Whether the zone is disabled

Returned: always

dnssecStatus

string

DNSSEC status of the zone

Returned: always

internal

boolean

Whether the zone is internal

Returned: always

lastModified

string

When the zone was last modified

Returned: always

name

string

Zone name

Returned: always

notifyFailed

boolean

Whether zone notification failed

Returned: always

notifyFailedFor

list / elements=string

List of hosts for which notification failed

Returned: always

soaSerial

integer

SOA serial number of the zone

Returned: always

type

string

Zone type (e.g., Primary, Secondary)

Returned: always

status

string

API response status

Returned: always

Sample: "ok"

changed

boolean

Whether the module made changes (always false for get operations)

Returned: always

Sample: false

failed

boolean

Whether the module failed

Returned: always

Sample: false

records

list / elements=string

List of DNS records (convenience extraction from api_response.response.records)

See api_response.response.records for detailed field documentation

Returned: always

Sample: [{"disabled": false, "dnssecStatus": "Unknown", "name": "example.com", "rData": {"ipAddress": "192.0.2.1"}, "ttl": 3600, "type": "A"}]

Authors

  • Frank Muise (@effectivelywild)