damex.incus.incus_cluster_group module – Ensure Incus cluster group

Note

This module is part of the damex.incus collection (version 1.10.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_group.

Synopsis

  • Create, update, and delete Incus cluster groups via the Incus REST API.

  • Cluster groups allow launching instances on a cluster member that belongs to a subset of all available members.

  • The members list is managed as a full replacement — members not listed are removed.

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.

description

string

The description of the cluster group.

Default: ""

members

list / elements=string

List of members in this group.

Managed as a full replacement — members not listed are removed from the group.

name

string / required

Name of the cluster group.

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"

state

string

Desired state of the cluster group.

Choices:

  • "present" ← (default)

  • "absent"

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)

wait

boolean

Whether to wait for async operations to complete before returning.

Set to false for fire-and-forget behaviour.

Choices:

  • false

  • true ← (default)

Examples

- name: Ensure cluster group for ARM64 DPU nodes
  damex.incus.incus_cluster_group:
    name: dpu
    description: ARM64 DPU nodes
    members:
      - arm64-node1
      - arm64-node2

- name: Ensure empty cluster group
  damex.incus.incus_cluster_group:
    name: staging

- name: Ensure cluster group is absent
  damex.incus.incus_cluster_group:
    name: dpu
    state: absent

Authors

  • Roman Kuzmitskii (@damex)