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.4).

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.

To use it in a playbook, specify: ravendb.ravendb.node.

New in ravendb.ravendb 1.0.0

Synopsis

  • Adds a RavenDB node to a cluster, either as a member or a watcher.

  • Performs a topology check first and becomes a no-op if the node is already present (by tag or URL).

  • Supports secured clusters with HTTPS, client certificates (PEM format), and optional CA bundle for verification.

  • Check mode is supported to simulate the addition without applying changes.

Parameters

Parameter

Comments

ca_cert_path

string

Path to a CA certificate bundle to verify the server certificate.

certificate_path

string

Path to a client certificate in PEM format (combined certificate and key).

Required for secured clusters (HTTPS with client authentication).

leader_url

string / required

The HTTP/HTTPS URL of the cluster leader the module will contact to add the node.

tag

string / required

The unique tag for the node (uppercase alphanumeric, 1–4 chars).

type

string

Node type. Use Watcher to add the node as a watcher instead of a full member.

Choices:

  • "Member" ← (default)

  • "Watcher"

url

string / required

The HTTP/HTTPS URL of the node being added.

Attributes

Attribute

Support

Description

check_mode

Support: full

Can run in check_mode and return changed status prediction without modifying target. If not supported, the action will be skipped.

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: admin.client.combined.pem
    ca_cert_path: ca_certificate.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

changed

boolean

Indicates if the cluster topology was changed or would have changed (check mode).

Returned: always

Sample: true

msg

string

added in ravendb.ravendb 1.0.0

Human-readable message describing the result or error.

Returned: always

Sample: "Node 'B' added as Member."

Authors

  • Omer Ratsaby (@thegoldenplatypus)