damex.incus.incus_image_imports role – Ensure Incus image imports.
Note
This role is part of the damex.incus collection (version 1.9.0).
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_imports.
Entry point main – Ensure Incus image imports.
Synopsis
Ensure Incus image imports.
Parameters
Parameter |
Comments |
|---|---|
List of image imports to ensure. |
|
Primary alias for the image. |
|
Additional aliases to assign to the image. |
|
Image architecture identifier. |
|
Expected checksum of the source file for verification. |
|
Hash algorithm used for checksum verification. Choices:
|
|
Whether to delete and re-import the image even when the alias already exists. Choices:
|
|
Incus project to scope the image to. |
|
Image properties included in the metadata. |
|
Human-readable image description. |
|
Image name. |
|
Operating system name. |
|
Operating system release or version. |
|
Image serial or build identifier. |
|
Image variant. |
|
Whether to make the image available to unauthenticated users. Choices:
|
|
Path to a local image file or URL to download from. |
|
Desired state of the image. Choices:
|
|
Timeout in seconds for downloading the source file from a URL. |
|
Image architecture identifier. |
|
Hash algorithm used for checksum verification. Choices:
|
|
Client certificate content for API authentication. |
|
Path to the TLS client certificate for API authentication. |
|
Client key content for API authentication. |
|
Path to the TLS client key for API authentication. |
|
Whether to delete and re-import images even when the alias already exists. Choices:
|
|
Incus project to scope images to. |
|
Whether to make images available to unauthenticated users. Choices:
|
|
Server certificate content for API verification. |
|
Path to the TLS server certificate for API verification. |
|
Path to the Incus Unix socket. |
|
Desired state of the images. Choices:
|
|
Timeout in seconds for downloading the source file from a URL. |
|
Authentication token for the Incus API. |
|
URL of the Incus server API. |
|
Whether to validate TLS certificates. Choices:
|
Examples
- name: Ensure incus image imports
hosts: incus
tasks:
- name: Ensure incus image imports
ansible.builtin.import_role:
name: damex.incus.incus_image_imports
vars:
incus_image_imports:
- alias: chr/7.22
source: https://download.mikrotik.com/routeros/7.22/chr-7.22.img.zip
properties:
os: RouterOS
release: "7.22"
description: MikroTik CHR 7.22
- alias: custom/1.0
source: /tmp/custom-image.qcow2
properties:
os: CustomOS
release: "1.0"
description: Custom OS Image