effectivelywild.technitium_dns.technitium_dns_delete_cluster module – Delete DNS cluster configuration

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. You need further requirements to be able to use this module, see Requirements for details.

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

New in effectivelywild.technitium_dns 1.0.0

Synopsis

  • Remove all cluster configuration from the Primary node.

  • There will be no data loss except for the cluster configuration.

  • This call can only be made at the Primary node.

  • You can only delete the cluster when there are no Secondary nodes, unless force_delete is used.

Requirements

The below requirements are needed on the host that executes this module.

  • Technitium DNS Server v14.0 or later

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

force_delete

boolean

Set to true to delete the cluster even when Secondary nodes exist, orphaning them.

Use this only when Secondary nodes are unreachable/decommissioned.

Choices:

  • false ← (default)

  • true

node

string

The node domain name for which this call is intended.

When unspecified, the current node (the primary) is used.

Set the node name to `cluster` to target the entire cluster.

This parameter can only be used when clustering is initialized.

validate_certs

boolean

Whether to validate SSL certificates when making API requests.

Choices:

  • false

  • true ← (default)

Notes

Note

  • This operation requires Administration Delete permission.

  • Use force_delete with caution as it will orphan Secondary nodes.

  • This can only be run on the Primary node.

See Also

Examples

- name: Delete cluster configuration
  effectivelywild.technitium_dns.technitium_dns_delete_cluster:
    api_url: "http://localhost"
    api_token: "myapitoken"
  register: result

- name: Display result
  debug:
    var: result.cluster_state

- name: Force delete cluster with orphaned secondaries
  effectivelywild.technitium_dns.technitium_dns_delete_cluster:
    api_url: "http://localhost"
    api_token: "myapitoken"
    force_delete: true
  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

Returned: always

Sample: true

cluster_state

dictionary

Cluster state after deletion

Returned: always

clusterInitialized

boolean

Whether the cluster is initialized (should be false after deletion)

Returned: always

Sample: false

dnsServerDomain

string

The DNS server domain name

Returned: always

Sample: "server1"

version

string

Technitium DNS Server version

Returned: always

Sample: "14.0"

failed

boolean

Whether the module failed

Returned: always

Sample: false

msg

string

Status message

Returned: always

Sample: "Cluster deleted successfully"

Authors

  • Frank Muise (@effectivelywild)