damex.incus.incus_server module – Ensure Incus server configuration
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_server.
Synopsis
Ensures Incus server configuration via the Incus REST API.
When init is enabled, bootstraps the server using preseed.
Supports logging targets (Loki, syslog, webhook) as a validated list inside config that gets flattened to logging.NAME.* keys.
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 configuration for preseed initialization. Only used when init is enabled. |
|
Address of an existing cluster member to join. |
|
Expected cluster certificate in X509 PEM format. |
|
Token for joining an existing cluster. |
|
Whether clustering is enabled. Choices:
|
|
Member-specific configuration overrides for joining. |
|
Type of entity being configured. |
|
Configuration key to set. |
|
Name of the entity. |
|
Value for the configuration key. |
|
Address of the cluster member. |
|
Name of the cluster member. |
|
Server configuration key-value pairs. Logging targets can be specified as a list under the logging key and will be automatically flattened to logging.NAME.* config keys. Default: |
|
Agree to ACME terms of service. Choices:
|
|
URL to the ACME CA directory. |
|
ACME challenge type to use. Choices:
|
|
Domain for which to issue the certificate. |
|
Email address for the account registration. |
|
Port to use for HTTP-01 challenge listener. |
|
DNS provider for DNS-01 challenge. |
|
Environment variables for the DNS provider. |
|
DNS resolvers for the DNS-01 challenge. |
|
Starlark scriptlet for custom authorization logic. |
|
Compression algorithm to use for backups. |
|
Threshold after which an offline cluster member is evacuated. |
|
Address to bind for intra-cluster communication. |
|
Minimum number of cluster members that keep a copy of an image. |
|
Expiry time for cluster join tokens. |
|
Maximum number of standby database members. |
|
Maximum number of voting database members. |
|
Seconds after which an unresponsive member is considered offline. |
|
Number of instances to move per rebalance batch. |
|
Cooldown period between rebalance batches. |
|
Interval in seconds between rebalance checks. |
|
Percentage threshold to trigger instance rebalancing. |
|
Address to bind the BGP server to. |
|
BGP Autonomous System Number for the local server. |
|
BGP router ID for the local server. |
|
Address to bind the pprof debug server to. |
|
Address to bind the authoritative DNS server to. |
|
Address to bind the remote API to. |
|
Whether to set Access-Control-Allow-Credentials. Choices:
|
|
Access-Control-Allow-Headers header value. |
|
Access-Control-Allow-Methods header value. |
|
Access-Control-Allow-Origin header value. |
|
Comma-separated list of trusted proxy IP addresses. |
|
Address to bind the metrics server to. |
|
Whether to enforce authentication on the metrics endpoint. Choices:
|
|
HTTP proxy to use. |
|
HTTPS proxy to use. |
|
Hosts that do not need the proxy. |
|
Expiry time for remote add join tokens. |
|
Number of minutes to wait for running operations to complete before shutdown. |
|
Address to bind the storage buckets API to. |
|
Whether to enable the syslog socket listener. Choices:
|
|
Whether to trust CA-signed client certificates. Choices:
|
|
Whether to auto-update cached images. Choices:
|
|
Interval in hours between image auto-update checks. |
|
Compression algorithm to use for images. |
|
Default architecture to use in mixed-architecture clusters. |
|
Number of days after which an unused cached remote image is removed. |
|
Whether to use a per-instance LXCFS process. Choices:
|
|
How to set the host name for a NIC. |
|
Starlark scriptlet for custom instance placement. |
|
List of logging targets. Each target is flattened to logging.NAME.* config keys. |
|
Projects to send lifecycle events for. |
|
Lifecycle event types to send. |
|
Minimum log level to send to the logger. |
|
Name of the logging target. |
|
Address of the logging target. |
|
CA certificate for the server. |
|
Syslog facility for the log message. |
|
Name to use as the instance field in Loki events. |
|
Labels for a Loki log entry. |
|
Password for authentication. |
|
Number of delivery retries. |
|
Type of logging target. Choices:
|
|
Username for authentication. |
|
Events to send to the logger. |
|
CA certificate for the OVN northbound connection. |
|
Client certificate for the OVN northbound connection. |
|
Client key for the OVN northbound connection. |
|
Name of the OVS integration bridge to use. |
|
OVN northbound database connection string. |
|
OVS database connection string. |
|
Expected audience value for the OIDC provider. |
|
OIDC claim to use as the username. |
|
OIDC client ID for the Incus server. |
|
Issuer URL for the OIDC provider. |
|
Comma-separated list of OIDC scopes to request. |
|
API token for the OpenFGA server. |
|
URL of the OpenFGA server. |
|
OpenFGA store ID. |
|
Volume to use for storing backup tarballs. |
|
Volume to use for storing image tarballs. |
|
CA certificate for the LINSTOR controller connection. |
|
Client certificate for the LINSTOR controller connection. |
|
Client key for the LINSTOR controller connection. |
|
LINSTOR controller connection string. |
|
LINSTOR satellite node name for this server. |
|
Volume to use for storing log files. |
|
Whether to initialize the server using preseed. Always applies the preseed when enabled. Choices:
|
|
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: |
|
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 server is initialized
damex.incus.incus_server:
init: true
config:
core.https_address: :8443
- name: Ensure server is initialized with cluster
damex.incus.incus_server:
init: true
config:
core.https_address: :8443
cluster:
enabled: true
server_name: node1
server_address: node1:8443
- name: Ensure server configuration
damex.incus.incus_server:
config:
core.https_address: :8443
- name: Ensure server with Loki logging
damex.incus.incus_server:
config:
core.https_address: :8443
logging:
- name: loki01
target.type: loki
target.address: https://loki.example.com:3100
target.labels: env=prod
types: lifecycle,logging
logging.level: info
- name: Ensure server with syslog logging
damex.incus.incus_server:
config:
logging:
- name: syslog01
target.type: syslog
target.address: tcp://syslog.example.com:514
target.facility: daemon
types: lifecycle,logging