effectivelywild.technitium_dns.technitium_dns_update_cluster_node_ip module – Update cluster node IP address

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

New in effectivelywild.technitium_dns 1.0.0

Synopsis

  • Update the current cluster node’s IP address.

  • This can be called at both Primary and Secondary nodes.

  • Use this when the node’s IP address has changed.

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

ip_address

string / required

The new IP address to be updated for the current node.

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.

validate_certs

boolean

Whether to validate SSL certificates when making API requests.

Choices:

  • false

  • true ← (default)

Notes

Note

  • This operation requires Administration Modify permission.

  • Can be run on both Primary and Secondary nodes.

See Also

Examples

- name: Update current node's IP address
  effectivelywild.technitium_dns.technitium_dns_update_cluster_node_ip:
    api_url: "http://localhost"
    api_token: "myapitoken"
    ip_address: "192.168.10.200"
  register: result

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

- name: Update specific node's IP address
  effectivelywild.technitium_dns.technitium_dns_update_cluster_node_ip:
    api_url: "http://localhost"
    api_token: "myapitoken"
    node: "server2.example.com"
    ip_address: "192.168.10.201"

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 IP address

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 (IP should be updated for the specified node)

Returned: always

id

integer

Node ID

Returned: success

Sample: 811905692

ipAddress

string

Node IP address (updated)

Returned: success

Sample: "192.168.10.200"

name

string

Node domain name

Returned: success

Sample: "server2.example.com"

type

string

Node type

Returned: success

Sample: "Primary"

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: "Node IP address updated successfully"

Authors

  • Frank Muise (@effectivelywild)