damex.incus.incus_cluster_member_info module – Ensure Incus cluster member information is gathered

Note

This module is part of the damex.incus collection (version 1.9.3).

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 damex.incus.

To use it in a playbook, specify: damex.incus.incus_cluster_member_info.

Synopsis

  • Gather information about Incus cluster members via the Incus REST API.

  • Returns information about all cluster members or a specific member.

  • Returns empty list when the node is not part of a cluster.

Parameters

Parameter

Comments

client_cert

string

Client certificate content for remote authentication.

Requires url and client_key. Mutually exclusive with token and client_cert_path.

client_cert_path

string

Path to the client certificate for remote authentication.

Requires url and client_key_path. Mutually exclusive with token and client_cert.

client_key

string

Client key content for remote authentication.

Requires url and client_cert. Mutually exclusive with client_key_path.

client_key_path

string

Path to the client key for remote authentication.

Requires url and client_cert_path. Mutually exclusive with client_key.

name

string

Name of the cluster member to query.

If not specified, all cluster members are returned.

server_cert

string

Server certificate content for remote verification.

Requires url. Mutually exclusive with server_cert_path.

server_cert_path

string

Path to the server certificate for remote verification.

Requires url. Mutually exclusive with server_cert.

socket_path

string

Path to the Incus Unix socket for local connections.

Default: "/var/lib/incus/unix.socket"

token

string

Token for remote authentication.

Requires url. Mutually exclusive with client_cert.

url

string

URL of the remote Incus server (e.g. https://host:8443).

If specified, connects via HTTPS instead of Unix socket.

validate_certs

boolean

Whether to validate the server TLS certificate.

Choices:

  • false

  • true ← (default)

Examples

- name: Ensure cluster member information is gathered
  damex.incus.incus_cluster_member_info:
    socket_path: /var/lib/incus/unix.socket
  register: result

- name: Ensure specific cluster member information is gathered
  damex.incus.incus_cluster_member_info:
    name: node1
  register: result

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

cluster_members

list / elements=dictionary

List of cluster member information. Empty if node is not clustered.

Returned: always

config

dictionary

Member configuration.

Returned: success

database

boolean

Whether the member is a database node.

Returned: success

description

string

Member description.

Returned: success

failure_domain

string

Failure domain of the member.

Returned: success

groups

list / elements=string

Cluster groups for the member.

Returned: success

roles

list / elements=string

Roles assigned to the cluster member.

Returned: success

server_name

string

Name of the cluster member.

Returned: success

status

string

Status of the cluster member.

Returned: success

url

string

URL of the cluster member.

Returned: success

Authors

  • Roman Kuzmitskii (@damex)