ravendb.ravendb.node module – Add a RavenDB node to an existing cluster
Note
This module is part of the ravendb.ravendb collection (version 1.0.3).
You might already have this collection installed if you are using the ansible
package.
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 ravendb.ravendb
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: ravendb.ravendb.node
.
New in ravendb.ravendb 1.0.0
Synopsis
This module adds a RavenDB node to a cluster, either as a member or a watcher.
Requires specifying the leader node’s URL.
Supports check mode to simulate the addition without applying changes.
Supports secured clusters with HTTPS, client certificates (PEM format), and optional CA bundle for verification.
The module inspects cluster topology first and skips adding if the node is already present.
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.9
requests
Role ravendb.ravendb.ravendb_python_client_prerequisites must be installed before using this module.
Parameters
Parameter |
Comments |
---|---|
Path to a CA certificate bundle to verify the server certificate. |
|
Path to a client certificate in PEM format (combined certificate and key). Required for secured clusters (HTTPS with client authentication). |
|
The HTTP/HTTPS URL of the cluster leader. |
|
The unique tag for the node (uppercase alphanumeric). |
|
Node type. Use “Watcher” to add the node as a watcher instead of a full member. Choices:
|
|
The HTTP/HTTPS URL of the node being added. |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in check_mode and return changed status prediction without modifying target. If not supported, the action will be skipped. |
Notes
Note
The node
tag
must be an uppercase, non-empty alphanumeric string.URLs must be valid HTTP or HTTPS addresses.
Check mode is fully supported and simulates joining the node without actually performing the action.
If the node is already part of the cluster (by tag or URL), the task is a no-op.
Supports both unsecured (HTTP) and secured (HTTPS) RavenDB clusters.
See Also
See also
- RavenDB documentation
Official RavenDB documentation
Examples
- name: Join Node B as a Watcher (HTTP, no cert)
ravendb.ravendb.node:
tag: B
type: "Watcher"
url: "http://192.168.118.120:8080"
leader_url: "http://192.168.117.90:8080"
- name: Join Node B as Watcher (HTTPS)
ravendb.ravendb.node:
tag: B
type: "Watcher"
url: "https://b.ravendbansible.development.run"
leader_url: "https://a.ravendbansible.development.run"
certificate_path: /etc/ravendb/security/admin.client.combined.pem
- name: Simulate adding Node D (check mode)
ravendb.ravendb.node:
tag: D
url: "http://192.168.118.200:8080"
leader_url: "http://192.168.117.90:8080"
check_mode: yes
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Indicates if the cluster topology was changed or would have changed (check mode). Returned: always Sample: |
|
Human-readable message describing the result or error. Returned: always Sample: |