effectivelywild.technitium_dns.technitium_dns_update_primary_node module – Update Primary node details on a Secondary node

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

New in effectivelywild.technitium_dns 1.0.0

Synopsis

  • Update the Primary node’s URL and IP address details on this Secondary node.

  • This is useful when the Primary node’s IP address or URL has changed while the Secondary node was offline.

  • This call can only be made at a Secondary 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

node

string

The node domain name for which this API call is intended.

When unspecified, the current node is used.

This parameter can only be used when clustering is initialized.

primary_node_ip_address

string

The IP address of the Primary node.

Optional parameter for updating the Primary node’s IP address.

primary_node_url

string / required

The HTTPS URL of the Primary node.

validate_certs

boolean

Whether to validate SSL certificates when making API requests.

Choices:

  • false

  • true ← (default)

Notes

Note

  • This operation requires Administration Modify permission.

  • This can only be run on a Secondary node.

  • Use this when the Primary node’s connection details have changed.

See Also

Examples

- name: Update Primary node URL on Secondary
  effectivelywild.technitium_dns.technitium_dns_update_primary_node:
    api_url: "http://localhost"
    api_token: "myapitoken"
    primary_node_url: "https://dns-primary.example.com:5380/"
  register: result

- name: Update Primary node URL and IP address
  effectivelywild.technitium_dns.technitium_dns_update_primary_node:
    api_url: "http://localhost"
    api_token: "myapitoken"
    primary_node_url: "https://dns-primary.example.com:5380/"
    primary_node_ip_address: "192.168.1.100"
  register: result

- name: Display cluster state after update
  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 updating Primary node details

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

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 (this Secondary node)

Returned: always

Sample: "server2.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: "Primary node details updated successfully"

Authors

  • Frank Muise (@effectivelywild)