effectivelywild.technitium_dns.technitium_dns_list_cache module – List cached DNS zones and records

Note

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

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

New in effectivelywild.technitium_dns 0.8.0

Synopsis

  • Retrieve cached DNS zones and records from server cache.

  • Can list cache for a specific domain or browse the cache hierarchy.

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

direction

string

Direction for browsing the zone hierarchy.

Allows the server to skip empty labels when browsing.

Choices:

  • "up"

  • "down" ← (default)

domain

string

The domain name to list cached records for.

If not specified, lists the cache root (empty string).

Default: ""

validate_certs

boolean

Whether to validate SSL certificates when making API requests.

Choices:

  • false

  • true ← (default)

See Also

Examples

- name: List all cached zones at root
  technitium_dns_list_cache:
    api_url: "http://localhost"
    api_token: "myapitoken"
  register: result

- name: List cached records for google.com
  technitium_dns_list_cache:
    api_url: "http://localhost"
    api_token: "myapitoken"
    domain: "google.com"
  register: result

- name: Browse cache hierarchy upward from subdomain
  technitium_dns_list_cache:
    api_url: "http://localhost"
    api_token: "myapitoken"
    domain: "www.example.com"
    direction: "up"
  register: result

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 list operations)

Returned: always

Sample: false

domain

string

The domain name that was queried

Returned: always

Sample: "google.com"

failed

boolean

Whether the module failed

Returned: always

Sample: false

records

list / elements=dictionary

List of cached DNS records for the domain

Returned: always

name

string

Record name

Returned: always

Sample: "google.com"

rData

dictionary

Record data

Returned: always

Sample: {"value": "216.58.199.174"}

ttl

string

Time to live for the cached record

Returned: always

Sample: "283 (4 mins 43 sec)"

type

string

DNS record type

Returned: always

Sample: "A"

zones

list / elements=string

List of sub-zones under the queried domain

Returned: always

Sample: ["www.google.com", "mail.google.com"]

Authors

  • Frank Muise (@effectivelywild)