effectivelywild.technitium_dns.technitium_dns_list_blocked_zones module – List blocked zones

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

New in effectivelywild.technitium_dns 0.7.0

Synopsis

  • Retrieve a list of blocked zones.

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

Allows specifying the direction of browsing the zone.

This option allows the server to skip empty labels in the domain name when browsing up or down.

Choices:

  • "up"

  • "down" ← (default)

domain

string

The domain name to list records. If not passed, the domain is set to empty string which corresponds to the zone root.

validate_certs

boolean

Whether to validate SSL certificates when making API requests

Choices:

  • false

  • true ← (default)

See Also

Examples

- name: List all blocked zones
  technitium_dns_list_blocked_zones:
    api_url: "http://localhost"
    api_token: "myapitoken"
  register: result

- debug:
    var: result.zones

- name: List blocked zones for specific domain
  technitium_dns_list_blocked_zones:
    api_url: "http://localhost"
    api_token: "myapitoken"
    domain: "ads.example.com"
  register: result

- name: List blocked zones browsing up
  technitium_dns_list_blocked_zones:
    api_url: "http://localhost"
    api_token: "myapitoken"
    domain: "tracker.ads.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: "ads.example.com"

failed

boolean

Whether the module failed

Returned: always

Sample: false

records

list / elements=dictionary

List of DNS records in the blocked zone

Returned: always

name

string

Record name

Returned: always

Sample: "ads.example.com"

rData

dictionary

Record data

Returned: always

ttl

string

Time to live

Returned: always

Sample: "14400 (4 hours)"

type

string

Record type

Returned: always

Sample: "NS"

zones

list / elements=string

List of zone names

Returned: always

Sample: ["ads.com", "tracker.com"]

Authors

  • Frank Muise (@effectivelywild)