effectivelywild.technitium_dns.technitium_dns_get_zone_info module – Get DNS zone(s)

Note

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

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_zone_info.

New in effectivelywild.technitium_dns 0.1.0

Synopsis

  • Retrieve all DNS zones, or filter by zone type and/or name, from a Technitium DNS server.

  • Returns a subset of zone information compared to `technitium_dns_get_zone_options`

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

validate_certs

boolean

Whether to validate SSL certificates when making API requests.

Choices:

  • false

  • true ← (default)

zone

string

The DNS zone to retrieve information for. If not specified, all zones are returned.

zone_type

string

Filter zones by type.

Choices:

  • "Primary"

  • "Forwarder"

  • "SecondaryForwarder"

  • "Stub"

  • "Secondary"

  • "Catalog"

  • "SecondaryCatalog"

  • "SecondaryROOT"

See Also

Examples

- name: Get all zones from Technitium DNS
  technitium_dns_get_zone_info:
    api_url: "http://localhost"
    api_token: "myapitoken"
    port: 5203
  register: result

- debug:
    var: result.zones

- name: Get all Primary zones from Technitium DNS
  technitium_dns_get_zone_info:
    api_url: "http://localhost"
    api_token: "myapitoken"
    zone_type: Primary
  register: result

- debug:
    var: result.zones

- name: Get a specific zone from Technitium DNS
  technitium_dns_get_zone_info:
    api_url: "http://localhost"
    api_token: "myapitoken"
    zone: "example.com"
  register: result

- debug:
    var: result.zones

Return Values

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

Key

Description

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

zones

list / elements=dictionary

List of zones (always returned as a list, even for single zone requests)

Returned: always

catalog

string

Catalog zone association (null if not part of catalog)

Returned: always

disabled

boolean

Whether the zone is disabled

Returned: always

Sample: false

dnssecStatus

string

DNSSEC status of the zone

Returned: always

Sample: "Unsigned"

internal

boolean

Whether the zone is internal

Returned: always

Sample: false

lastModified

string

When the zone was last modified (ISO 8601 format)

Returned: always

Sample: "2025-09-04T17:26:31.5111735Z"

name

string

Zone name/domain

Returned: always

Sample: "demo.test.local"

notifyFailed

boolean

Whether zone notification failed

Returned: always

Sample: false

notifyFailedFor

list / elements=string

List of hosts for which notification failed

Returned: always

Sample: []

soaSerial

integer

SOA serial number of the zone

Returned: always

Sample: 2025090400

type

string

Zone type

Returned: always

Sample: "Primary"

Authors

  • Frank Muise (@effectivelywild)