effectivelywild.technitium_dns.technitium_dns_promote_secondary_node module – Promote a Secondary node to Primary
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_promote_secondary_node.
New in effectivelywild.technitium_dns 1.0.0
Synopsis
Promote this Secondary node to become the Primary node in the cluster.
This process will resync complete configuration from the current Primary node.
Then it will delete the current Primary from the cluster.
Finally it will upgrade this Secondary node to become the new Primary.
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 |
|---|---|
Port for the Technitium DNS API. Defaults to 5380 Default: |
|
API token for authenticating with the Technitium DNS API |
|
Base URL for the Technitium DNS API |
|
Set to true to delete the current Primary node without resyncing config and without informing it. Use this only when the Primary node is unreachable/decommissioned. Choices:
|
|
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. |
|
Whether to validate SSL certificates when making API requests. Choices:
|
Notes
Note
This operation requires Administration Delete permission.
The process may take a while depending on config size and number of local zones.
Use force_delete_primary only when the current Primary is unreachable/decommissioned.
This can only be run on a Secondary node.
See Also
See also
- effectivelywild.technitium_dns.technitium_dns_init_cluster
Initialize a new cluster
- effectivelywild.technitium_dns.technitium_dns_init_join_cluster
Join a cluster as Secondary
- effectivelywild.technitium_dns.technitium_dns_get_cluster_state
Get cluster state information
Examples
- name: Promote this Secondary node to Primary
effectivelywild.technitium_dns.technitium_dns_promote_secondary_node:
api_url: "http://localhost"
api_token: "myapitoken"
register: result
- name: Display new cluster state
debug:
var: result.cluster_state
- name: Force promote when current Primary is unreachable
effectivelywild.technitium_dns.technitium_dns_promote_secondary_node:
api_url: "http://localhost"
api_token: "myapitoken"
force_delete_primary: true
register: result
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Whether the module made changes Returned: always Sample: |
|
Complete cluster state after promotion Returned: always |
|
The cluster domain name Returned: always Sample: |
|
Whether the cluster is initialized Returned: always Sample: |
|
List of nodes in the cluster (this node should now be type Primary) Returned: always |
|
Node ID Returned: success Sample: |
|
Node domain name Returned: success Sample: |
|
Node state Returned: success Sample: |
|
Node type (should be Primary for this node) Returned: success Sample: |
|
When the configuration was last synced Returned: always Sample: |
|
Interval in seconds for config refresh Returned: always Sample: |
|
Interval in seconds for config retry Returned: always Sample: |
|
The DNS server domain name (this node) Returned: always Sample: |
|
Interval in seconds for heartbeat refresh Returned: always Sample: |
|
Interval in seconds for heartbeat retry Returned: always Sample: |
|
Technitium DNS Server version Returned: always Sample: |
|
Whether the module failed Returned: always Sample: |
|
Status message Returned: always Sample: |