damex.incus.incus_projects role – Ensure Incus projects.

Note

This role 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_projects.

Entry point main – Ensure Incus projects.

Synopsis

  • Ensure Incus projects.

Parameters

Parameter

Comments

incus_projects

list / elements=dictionary

Incus projects to ensure.

config

dictionary

Project configuration keys.

backups.compression_algorithm

string

Compression algorithm for backups.

Choices:

  • "bzip2"

  • "gzip"

  • "lz4"

  • "lzma"

  • "xz"

  • "zstd"

  • "none"

features.images

boolean

Separate image store.

Choices:

  • false

  • true

features.networks

boolean

Separate network management.

Choices:

  • false

  • true

features.networks.zones

boolean

Separate network zone management.

Choices:

  • false

  • true

features.profiles

boolean

Separate profile store.

Choices:

  • false

  • true

features.storage.buckets

boolean

Separate storage bucket management.

Choices:

  • false

  • true

features.storage.volumes

boolean

Separate storage volume management.

Choices:

  • false

  • true

images.auto_update_cached

boolean

Cached image auto-update.

Choices:

  • false

  • true

images.auto_update_interval

integer

Image auto-update interval in hours.

images.compression_algorithm

string

Compression algorithm for images.

Choices:

  • "bzip2"

  • "gzip"

  • "lz4"

  • "lzma"

  • "xz"

  • "zstd"

  • "none"

images.default_architecture

string

Default architecture for images.

images.remote_cache_expiry

integer

Cached remote image expiry in days.

limits.containers

integer

Maximum container count.

limits.cpu

integer

Maximum CPU count.

limits.disk

string

Maximum disk space.

limits.instances

integer

Maximum instance count.

limits.memory

string

Maximum memory.

limits.networks

integer

Maximum network count.

limits.processes

integer

Maximum process count.

limits.virtual-machines

integer

Maximum virtual machine count.

network.hwaddr_pattern

string

Auto-generated MAC address pattern.

restricted

boolean

Security-sensitive feature restriction.

Choices:

  • false

  • true

restricted.backups

string

Instance and volume backup restriction.

Choices:

  • "allow"

  • "block"

restricted.cluster.groups

string

Allowed cluster groups, comma-separated.

restricted.cluster.target

string

Cluster member targeting.

Choices:

  • "allow"

  • "block"

restricted.containers.interception

string

Container system call interception.

Choices:

  • "allow"

  • "block"

  • "full"

restricted.containers.lowlevel

string

Low-level container options.

Choices:

  • "allow"

  • "block"

restricted.containers.nesting

string

Container nesting.

Choices:

  • "allow"

  • "block"

restricted.containers.privilege

string

Privileged container settings.

Choices:

  • "unprivileged"

  • "isolated"

  • "allow"

restricted.devices.disk

string

Disk device restriction.

Choices:

  • "allow"

  • "block"

  • "managed"

restricted.devices.disk.paths

string

Allowed disk source paths, comma-separated.

restricted.devices.gpu

string

GPU device allowance.

Choices:

  • "allow"

  • "block"

restricted.devices.infiniband

string

InfiniBand device allowance.

Choices:

  • "allow"

  • "block"

restricted.devices.nic

string

Network device restriction.

Choices:

  • "allow"

  • "block"

  • "managed"

restricted.devices.pci

string

PCI device allowance.

Choices:

  • "allow"

  • "block"

restricted.devices.proxy

string

Proxy device allowance.

Choices:

  • "allow"

  • "block"

restricted.devices.unix-block

string

Unix block device allowance.

Choices:

  • "allow"

  • "block"

restricted.devices.unix-char

string

Unix character device allowance.

Choices:

  • "allow"

  • "block"

restricted.devices.unix-hotplug

string

Unix hotplug device allowance.

Choices:

  • "allow"

  • "block"

restricted.devices.usb

string

USB device allowance.

Choices:

  • "allow"

  • "block"

restricted.idmap.gid

string

Allowed host GID ranges for raw.idmap.

restricted.idmap.uid

string

Allowed host UID ranges for raw.idmap.

restricted.networks.access

string

Allowed networks for access, comma-separated.

restricted.networks.integrations

string

Allowed network integrations, comma-separated.

restricted.networks.subnets

string

Allowed network subnets, comma-separated.

string

Allowed network uplinks, comma-separated.

restricted.networks.zones

string

Allowed network zones, comma-separated.

restricted.snapshots

string

Instance and volume snapshot restriction.

Choices:

  • "allow"

  • "block"

restricted.virtual-machines.lowlevel

string

Low-level virtual machine options.

Choices:

  • "allow"

  • "block"

description

string

Project description.

name

string / required

Project name.

state

string

Project desired state.

Choices:

  • "present"

  • "absent"

incus_projects_client_cert

string

Client certificate content for API authentication.

incus_projects_client_cert_path

path

TLS client certificate path for API authentication.

incus_projects_client_key

string

Client key content for API authentication.

incus_projects_client_key_path

path

TLS client key path for API authentication.

incus_projects_server_cert

string

Server certificate content for API verification.

incus_projects_server_cert_path

path

TLS server certificate path for API verification.

incus_projects_socket_path

path

Incus Unix socket path.

incus_projects_state

string

Projects desired state.

Choices:

  • "present"

  • "absent"

incus_projects_token

string

Incus API authentication token.

incus_projects_url

string

Incus server API URL.

incus_projects_validate_certs

boolean

TLS certificate validation.

Choices:

  • false

  • true

Examples

- name: Ensure incus projects
  hosts: incus
  tasks:
    - name: Ensure incus projects
      ansible.builtin.import_role:
        name: damex.incus.incus_projects
      vars:
        incus_projects:
          - name: production
            config:
              features.images: "true"
              features.profiles: "true"
              features.networks: "true"
              features.storage.volumes: "true"
          - name: staging