damex.incus.incus_certificate module – Ensure Incus certificate
Note
This module is part of the damex.incus collection (version 1.11.7).
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_certificate.
Synopsis
Add, update, and remove trusted certificates in the Incus trust store via the Incus REST API.
Certificates are identified by their friendly name.
Cluster-wide resource — not scoped to a project.
Parameters
Parameter |
Comments |
|---|---|
PEM-encoded client certificate to add. Required when creating a new trust store entry. Ignored on update. |
|
Client certificate content for remote authentication. Requires |
|
Client certificate path for remote authentication. Requires |
|
Client key content for remote authentication. Requires |
|
Client key path for remote authentication. Requires |
|
Friendly name for the certificate in the trust store. |
|
Whether the certificate is restricted to specific projects. Choices:
|
|
Server certificate content for remote verification. Requires |
|
Server certificate path for remote verification. Requires |
|
Incus Unix socket path for local connections. Default: |
|
Desired state of the certificate. Choices:
|
|
Token for remote authentication. Requires |
|
Certificate type. Choices:
|
|
Remote Incus server URL (e.g. https://host:8443). If specified, connects via HTTPS instead of Unix socket. |
|
Server TLS certificate validation. Choices:
|
|
Async operation completion wait. Set to Choices:
|
Examples
- name: Ensure client certificate
damex.incus.incus_certificate:
name: ansible
certificate: "{{ lookup('file', '/etc/incus/client.crt') }}"
- name: Ensure restricted certificate
damex.incus.incus_certificate:
name: ci-runner
certificate: "{{ lookup('file', 'ci.crt') }}"
restricted: true
projects:
- default
- staging
- name: Ensure certificate is absent
damex.incus.incus_certificate:
name: old-client
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Resource state change indicator. Returned: always |
|
Configuration keys that changed. Returned: always |
|
Before and after state for diff mode. Returned: changed |
|
State after the change. Returned: success |
|
State before the change. Returned: success |