damex.incus.incus_cluster_member module – Ensure Incus cluster member
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.
Synopsis
Ensures Incus cluster members via the Incus REST API.
When creating a new member, generates a join token and returns it.
When updating an existing member, ensures description, config, roles, groups, and failure domain.
When removing a member, deletes it from the cluster.
Parameters
Parameter |
Comments |
|---|---|
Client certificate content for remote authentication. Requires |
|
Path to the client certificate for remote authentication. Requires |
|
Client key content for remote authentication. Requires |
|
Path to the client key for remote authentication. Requires |
|
Cluster member configuration key-value pairs. Default: |
|
Controls how instances are scheduled to run on this member. Choices:
|
|
Description of the cluster member. Default: |
|
Failure domain of the cluster member. |
|
List of cluster groups for the member. |
|
Name of the cluster member. |
|
List of roles assigned to the cluster member. |
|
Server certificate content for remote verification. Requires |
|
Path to the server certificate for remote verification. Requires |
|
Path to the Incus Unix socket for local connections. Default: |
|
Desired state of the cluster member. Use joined to generate a join token for a new member. Use present to update an existing member. Choices:
|
|
Token for remote authentication. Requires |
|
URL of the remote Incus server (e.g. https://host:8443). If specified, connects via HTTPS instead of Unix socket. |
|
Whether to validate the server TLS certificate. Choices:
|
|
Whether to wait for async operations to complete before returning. Set to Choices:
|
Examples
- name: Ensure cluster member join token
damex.incus.incus_cluster_member:
name: node2
state: joined
register: result
- name: Ensure cluster member config
damex.incus.incus_cluster_member:
name: node1
config:
scheduler.instance: all
description: Primary node
- name: Ensure cluster member roles
damex.incus.incus_cluster_member:
name: node1
roles:
- database
- name: Ensure cluster member is absent
damex.incus.incus_cluster_member:
name: node2
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Addresses of existing online cluster members. Returned: when creating a new member |
|
Fingerprint of the cluster network certificate. Returned: when creating a new member |
|
Join secret for the cluster member. Returned: when creating a new member |