effectivelywild.technitium_dns.technitium_dns_delete_secondary_node module – Immediately delete a Secondary node from the cluster

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

New in effectivelywild.technitium_dns 1.0.0

Synopsis

  • Immediately delete a Secondary node entry from the cluster without asking it to leave gracefully.

  • The Secondary node will not be notified and will become orphaned.

  • Use this when the Secondary node is unreachable or unresponsive.

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

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

secondary_node_id

integer / required

The Secondary node ID which must be deleted from the cluster immediately.

This is the numeric ID visible in cluster state.

validate_certs

boolean

Whether to validate SSL certificates when making API requests.

Choices:

  • false

  • true ← (default)

Notes

Note

  • This operation requires Administration Delete permission.

  • This can only be run on the Primary node.

  • The Secondary node will NOT be notified and will become orphaned.

  • Use remove_secondary_node for graceful removal when possible.

See Also

See also

effectivelywild.technitium_dns.technitium_dns_remove_secondary_node

Gracefully remove a Secondary node (asks it to leave)

effectivelywild.technitium_dns.technitium_dns_get_cluster_state

Get cluster state information

Examples

- name: Get cluster state to find unreachable Secondary node
  effectivelywild.technitium_dns.technitium_dns_get_cluster_state:
    api_url: "http://localhost"
    api_token: "myapitoken"
  register: cluster_state

- name: Delete unreachable Secondary node immediately
  effectivelywild.technitium_dns.technitium_dns_delete_secondary_node:
    api_url: "http://localhost"
    api_token: "myapitoken"
    secondary_node_id: 811905692
  register: result
  when: cluster_state.cluster_state.clusterNodes | selectattr('id', 'equalto', 811905692) | selectattr('state', 'equalto', 'Unreachable') | list | length > 0

- name: Display updated cluster state
  debug:
    var: result.cluster_state

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

Complete cluster state after deleting Secondary node

Returned: always

clusterDomain

string

The cluster domain name

Returned: always

Sample: "example.com"

clusterInitialized

boolean

Whether the cluster is initialized

Returned: always

Sample: true

clusterNodes

list / elements=dictionary

List of nodes in the cluster (Secondary node should be deleted)

Returned: always

configRefreshIntervalSeconds

integer

Interval in seconds for config refresh

Returned: always

Sample: 900

configRetryIntervalSeconds

integer

Interval in seconds for config retry

Returned: always

Sample: 60

dnsServerDomain

string

The DNS server domain name

Returned: always

Sample: "server1.example.com"

heartbeatRefreshIntervalSeconds

integer

Interval in seconds for heartbeat refresh

Returned: always

Sample: 30

heartbeatRetryIntervalSeconds

integer

Interval in seconds for heartbeat retry

Returned: always

Sample: 10

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: "Secondary node deleted successfully"

Authors

  • Frank Muise (@effectivelywild)