damex.incus.incus_certificates role – Ensure Incus certificates.

Note

This role is part of the damex.incus collection (version 1.6.1).

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

Entry point main – Ensure Incus certificates.

Synopsis

  • Ensure Incus certificates.

Parameters

Parameter

Comments

incus_certificates

list / elements=dictionary

List of certificates to ensure.

certificate

string

PEM-encoded certificate content.

name

string / required

Name of the certificate.

projects

list / elements=string

List of projects the certificate has access to.

restricted

boolean

Whether the certificate is restricted.

Choices:

  • false

  • true

state

string

Desired state of the certificate.

Choices:

  • "present"

  • "absent"

type

string

Type of the certificate.

Choices:

  • "client"

  • "metrics"

incus_certificates_client_cert

path

Path to the TLS client certificate.

incus_certificates_client_key

path

Path to the TLS client key.

incus_certificates_server_cert

path

Path to the TLS server certificate.

incus_certificates_socket_path

path

Path to the Incus Unix socket.

incus_certificates_state

string

Desired state of the certificates.

Choices:

  • "present"

  • "absent"

incus_certificates_token

string

Authentication token for the Incus API.

incus_certificates_url

string

URL of the Incus server API.

incus_certificates_validate_certs

boolean

Whether to validate TLS certificates.

Choices:

  • false

  • true

Examples

- name: Ensure incus certificates
  hosts: incus
  tasks:
    - name: Ensure incus certificates
      ansible.builtin.import_role:
        name: damex.incus.incus_certificates
      vars:
        incus_certificates:
          - name: monitoring
            certificate: "{{ lookup('file', 'certs/monitoring.crt') }}"
            type: client
          - name: backup
            certificate: "{{ lookup('file', 'certs/backup.crt') }}"
            type: client