damex.incus.incus_images role – Ensure Incus images.

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

Entry point main – Ensure Incus images.

Synopsis

  • Ensure Incus images.

Parameters

Parameter

Comments

incus_images

list / elements=dictionary

List of images to ensure.

alias

string / required

Local alias to assign to the image.

auto_update

boolean

Whether to automatically update the image when a new build is available.

Choices:

  • false

  • true

copy_aliases

boolean

Whether to copy aliases from the source.

Choices:

  • false

  • true

project

string

Incus project to scope the image to.

public

boolean

Whether to make the image available to unauthenticated users.

Choices:

  • false

  • true

source

string / required

Remote source identifier for the image.

source_protocol

string

Protocol to use for the remote image server.

Choices:

  • "simplestreams"

  • "incus"

source_server

string

URL of the remote image server.

state

string

Desired state of the image.

Choices:

  • "present"

  • "absent"

type

string

Instance type for the image.

Choices:

  • "container"

  • "virtual-machine"

incus_images_auto_update

boolean

Whether to automatically update images when a new build is available.

Choices:

  • false

  • true

incus_images_client_cert

path

Path to the TLS client certificate.

incus_images_client_key

path

Path to the TLS client key.

incus_images_copy_aliases

boolean

Whether to copy aliases from the source.

Choices:

  • false

  • true

incus_images_project

string

Incus project to scope images to.

incus_images_public

boolean

Whether to make images available to unauthenticated users.

Choices:

  • false

  • true

incus_images_server_cert

path

Path to the TLS server certificate.

incus_images_socket_path

path

Path to the Incus Unix socket.

incus_images_source_protocol

string

Protocol to use for the remote image server.

Choices:

  • "simplestreams"

  • "incus"

incus_images_source_server

string

URL of the remote image server.

incus_images_state

string

Desired state of the images.

Choices:

  • "present"

  • "absent"

incus_images_token

string

Authentication token for the Incus API.

incus_images_type

string

Instance type for the images.

Choices:

  • "container"

  • "virtual-machine"

incus_images_url

string

URL of the Incus server API.

incus_images_validate_certs

boolean

Whether to validate TLS certificates.

Choices:

  • false

  • true

Examples

- name: Ensure incus images
  hosts: incus
  tasks:
    - name: Ensure incus images
      ansible.builtin.import_role:
        name: damex.incus.incus_images
      vars:
        incus_images:
          - source: images:debian/13
            alias: debian13
          - source: images:ubuntu/24.04
            alias: ubuntu2404
            type: virtual-machine
            auto_update: true