damex.incus.incus_certificate_info module – Ensure Incus certificate information is gathered

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_info.

Synopsis

  • Gather information about trusted certificates in the Incus trust store via the Incus REST API.

  • Returns information about all certificates or a specific certificate by name.

  • Certificates are global resources, not project-scoped.

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

Client certificate path 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

Client key path for remote authentication.

Requires url and client_cert_path. Mutually exclusive with client_key.

name

string

Friendly name of the certificate to query.

If not specified, all certificates are returned.

server_cert

string

Server certificate content for remote verification.

Requires url. Mutually exclusive with server_cert_path.

server_cert_path

string

Server certificate path for remote verification.

Requires url. Mutually exclusive with server_cert.

socket_path

string

Incus Unix socket path for local connections.

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

token

string

Token for remote authentication.

Requires url. Mutually exclusive with client_cert.

url

string

Remote Incus server URL (e.g. https://host:8443).

If specified, connects via HTTPS instead of Unix socket.

validate_certs

boolean

Server TLS certificate validation.

Choices:

  • false

  • true ← (default)

Examples

- name: Ensure certificate information is gathered
  damex.incus.incus_certificate_info:
    socket_path: /var/lib/incus/unix.socket
  register: result

- name: Ensure specific certificate information is gathered
  damex.incus.incus_certificate_info:
    name: ansible
  register: result

- name: Ensure certificate information is gathered from remote server
  damex.incus.incus_certificate_info:
    url: https://incus.example.com:8443
    client_cert_path: /etc/incus/client.crt
    client_key_path: /etc/incus/client.key
  register: result

Return Values

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

Key

Description

certificates

list / elements=dictionary

List of certificate information.

Returned: always

fingerprint

string

SHA-256 fingerprint of the certificate.

Returned: success

name

string

Friendly name of the certificate.

Returned: success

projects

list / elements=string

Projects the certificate is restricted to.

Returned: success

restricted

boolean

Whether the certificate is restricted to specific projects.

Returned: success

type

string

Certificate type.

Returned: success

Authors

  • Roman Kuzmitskii (@damex)