damex.incus.incus_image module – Ensure Incus image
Note
This module 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_image.
Synopsis
Copy and delete Incus images via the Incus REST API.
Images are project-scoped resources identified by alias.
Copying from remote servers uses the
remote:aliasformat (e.g.images:debian/13).
Parameters
Parameter |
Comments |
|---|---|
Alias for the image on the local server. Used to check existence and as the alias assigned on copy. |
|
Automatically update the image when a new build is available on the source server. Choices:
|
|
Path to the client certificate for remote authentication. Requires |
|
Path to the client key for remote authentication. Requires |
|
Copy all aliases from the source image. Choices:
|
|
Incus project to query. Default: |
|
Make the image available to unauthenticated users. Choices:
|
|
Path to the server certificate for remote verification. Requires |
|
Path to the Incus Unix socket for local connections. Default: |
|
Image reference to copy from, e.g. The |
|
URL of the image server to pull from, e.g. Takes precedence over auto-resolved remotes when |
|
Desired state of the image. Choices:
|
|
Token for remote authentication. Requires |
|
Image type to request from the remote server. Choices:
|
|
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: Copy Debian 13 container image
damex.incus.incus_image:
alias: debian/13
source: images:debian/13
- name: Copy Ubuntu 24.04 VM image
damex.incus.incus_image:
alias: ubuntu/24.04
source: images:ubuntu/24.04
type: virtual-machine
- name: Copy image with auto-update
damex.incus.incus_image:
alias: debian/13
source: images:debian/13
auto_update: true
- name: Delete an image
damex.incus.incus_image:
alias: debian/13
state: absent