damex.incus.incus_profile module – Ensure Incus profile
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_profile.
Synopsis
Create, update, and delete Incus profiles via the Incus REST API.
Profiles are project-scoped resources.
Parameters
Parameter |
Comments |
|---|---|
Path to the client certificate for remote authentication. Requires |
|
Path to the client key for remote authentication. Requires |
|
Configuration key-value pairs. Boolean values are converted to lowercase strings. Dict values for Default: |
|
Use instance NIC names and MTU for default interfaces. Choices:
|
|
Whether to restart the instance after a crash. Choices:
|
|
Whether to start the instance on daemon startup. Choices:
|
|
Seconds to wait after the instance started. |
|
Instance startup priority (higher starts first). |
|
Action to take on host shutdown. |
|
Seconds to wait for instance to stop on host shutdown. |
|
Instance shutdown priority (higher stops first). |
|
Cloud-init network configuration. |
|
Bond interface configurations. |
|
Static addresses in CIDR notation. |
|
Whether to enable DHCPv4. Choices:
|
|
Member interfaces for the bond. |
|
Bond name. |
|
DNS server configuration. |
|
List of DNS server addresses. |
|
Bond parameters. |
|
MII monitoring interval in milliseconds. |
|
Bonding mode. |
|
Static routes for the bond. |
|
Route destination in CIDR notation. |
|
Gateway address for the route. |
|
Bridge interface configurations. |
|
Static addresses in CIDR notation. |
|
Whether to enable DHCPv4. Choices:
|
|
Member interfaces for the bridge. |
|
Bridge name. |
|
DNS server configuration. |
|
List of DNS server addresses. |
|
Bridge parameters. |
|
Forwarding delay in seconds. |
|
Whether to enable Spanning Tree Protocol. Choices:
|
|
Static routes for the bridge. |
|
Route destination in CIDR notation. |
|
Gateway address for the route. |
|
Ethernet interface configurations. |
|
Static addresses in CIDR notation. |
|
Whether to enable DHCPv4. Choices:
|
|
Match rules for the interface. |
|
Kernel driver name to match. |
|
Interface name. |
|
DNS server configuration. |
|
List of DNS server addresses. |
|
Static routes for the interface. |
|
Route destination in CIDR notation. |
|
Gateway address for the route. |
|
Network renderer to use. |
|
Network config format version. |
|
VLAN interface configurations. |
|
Static addresses in CIDR notation. |
|
Whether to enable DHCPv4. Choices:
|
|
VLAN ID. |
|
Parent interface for the VLAN. |
|
VLAN interface name. |
|
DNS server configuration. |
|
List of DNS server addresses. |
|
Static routes for the VLAN. |
|
Route destination in CIDR notation. |
|
Gateway address for the route. |
|
Cloud-init user data configuration. |
|
Commands to run early in the boot process. |
|
Password change settings. |
|
Whether the password expires on first login. Choices:
|
|
Whether to upgrade packages on first boot. Choices:
|
|
Packages to install on first boot. |
|
Password for the default user. |
|
Power state change after cloud-init completes. |
|
Power state action to take. Choices:
|
|
Commands to run after cloud-init completes. |
|
Whether to enable SSH password authentication. Choices:
|
|
Default user name. |
|
Files to create on first boot. |
|
Content to write to the file. |
|
Owner and group of the file. |
|
Absolute path of the file to create. |
|
File permissions in octal notation. |
|
Cloud-init vendor data configuration. |
|
Commands to run early in the boot process. |
|
Password change settings. |
|
Whether the password expires on first login. Choices:
|
|
Whether to upgrade packages on first boot. Choices:
|
|
Packages to install on first boot. |
|
Password for the default user. |
|
Power state change after cloud-init completes. |
|
Power state action to take. Choices:
|
|
Commands to run after cloud-init completes. |
|
Whether to enable SSH password authentication. Choices:
|
|
Default user name. |
|
Files to create on first boot. |
|
Content to write to the file. |
|
Owner and group of the file. |
|
Absolute path of the file to create. |
|
File permissions in octal notation. |
|
Evacuation behavior during cluster evacuation. Choices:
|
|
Number or range of CPUs to expose. |
|
CPU time allowance as a percentage or fixed duration. |
|
NUMA nodes to restrict the instance to. |
|
CPU scheduling priority compared to other instances. |
|
I/O request priority when under load (0-10). |
|
Limit for 1GB huge pages. |
|
Limit for 1MB huge pages. |
|
Limit for 2MB huge pages. |
|
Limit for 64KB huge pages. |
|
Percentage of host memory or fixed value in bytes. |
|
Memory limit enforcement mode. |
|
Whether to enable memory hotplug. |
|
Whether to back instance memory with huge pages. Choices:
|
|
OOM killer priority for the instance. |
|
Whether to encourage or discourage swapping. |
|
Swap priority compared to other instances. |
|
Network I/O priority compared to other instances. |
|
Maximum number of processes in the instance. |
|
Comma-separated kernel modules to load. |
|
Whether to use incremental memory transfer. Choices:
|
|
Target percentage of dirty memory for completion. |
|
Maximum number of memory transfer iterations. |
|
Allow stateful stop/start and snapshots. Choices:
|
|
NVIDIA driver capabilities to expose. |
|
Required CUDA version. |
|
Required NVIDIA driver version. |
|
Pass NVIDIA runtime libraries into the container. Choices:
|
|
Working directory for the OCI container. |
|
Entrypoint for the OCI container. |
|
GID to run the OCI container as. |
|
UID to run the OCI container as. |
|
Raw AppArmor profile entries. |
|
Raw ID map configuration. |
|
Raw LXC configuration to append. |
|
Raw QEMU command-line arguments. |
|
Raw QEMU configuration overrides. |
|
Raw QMP commands before instance start. |
|
Raw QMP commands after instance start. |
|
Raw QMP commands just before instance start. |
|
Raw QEMU scriptlet. |
|
Raw Seccomp configuration. |
|
Whether the incus-agent exposes metrics. Choices:
|
|
Delegated BPF attach types. |
|
Delegated BPF commands. |
|
Delegated BPF map types. |
|
Delegated BPF program types. |
|
Path to the BPFFS mount in the instance. |
|
Whether to enable Compatibility Support Module. Choices:
|
|
Whether to enable the guest API. Choices:
|
|
Whether to allow image access via the guest API. Choices:
|
|
Base host UID/GID for the ID map. |
|
Whether to use a unique ID map for the instance. Choices:
|
|
Size of the ID map range. |
|
Whether to enable IOMMU for the instance. Choices:
|
|
Allow running Incus inside the instance. Choices:
|
|
Whether to run the instance in privileged mode. Choices:
|
|
Whether to prevent deletion of the instance. Choices:
|
|
Whether to prevent UID/GID shifting. Choices:
|
|
Whether to enable UEFI Secure Boot. Choices:
|
|
Whether to enable AMD SEV encryption. Choices:
|
|
Whether to enable SEV-ES for the instance. Choices:
|
|
SEV session data blob. |
|
SEV Diffie-Hellman key. |
|
Allowed syscalls whitelist. |
|
Denied syscalls blacklist. |
|
Whether to block compat syscalls on amd64. Choices:
|
|
Whether to enable default syscall deny list. Choices:
|
|
Whether to intercept bpf syscalls. Choices:
|
|
Whether to allow device-type BPF programs. Choices:
|
|
Whether to intercept mknod syscalls. Choices:
|
|
Whether to intercept mount syscalls. Choices:
|
|
Filesystems allowed for intercepted mounts. |
|
FUSE mounts to redirect intercepted mounts to. |
|
Whether to use ID-mapped mounts for intercepted mounts. Choices:
|
|
Whether to intercept sched_setscheduler syscalls. Choices:
|
|
Whether to intercept setxattr syscalls. Choices:
|
|
Whether to intercept sysinfo syscalls. Choices:
|
|
Automatic expiry time for snapshots. |
|
Expiry time for manually created snapshots. |
|
Pongo2 template for snapshot names. |
|
Cron expression for automatic snapshots. |
|
Whether to snapshot stopped instances. Choices:
|
|
Profile description. Default: |
|
Devices as a list. Each item must include a Boolean values are converted to lowercase strings. Default: |
|
Override the NIC MAC address (nic only). |
|
Static IPv4 address to assign to the NIC (nic only). |
|
Comma-separated IPv4 routes to add on the host for this NIC (nic only). |
|
Static IPv6 address to assign to the NIC (nic only). |
|
Comma-separated IPv6 routes to add on host for this NIC (nic only). |
|
Override the NIC MTU (nic only). |
|
Device name used as the key in the Incus API. |
|
Managed Incus network to attach the NIC to (nic only). |
|
NIC device sub-type, e.g. |
|
Host bridge or interface to attach the NIC to (nic only). |
|
Filesystem mount path inside the instance (disk only). |
|
Incus storage pool backing the disk device (disk only). |
|
Expose the disk as read-only inside the instance (disk only). Choices:
|
|
Maximum size of the disk device, e.g. |
|
Host path or device to pass through (disk only). |
|
Device type. Choices:
|
|
Name of the profile. |
|
Incus project to query. Default: |
|
Path to the server certificate for remote verification. Requires |
|
Path to the Incus Unix socket for local connections. Default: |
|
Desired state of the profile. Choices:
|
|
Token for remote authentication. Requires |
|
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: Create profile
damex.incus.incus_profile:
name: base
description: Base profile
config:
limits.cpu: "2"
limits.memory: 2GiB
devices:
- name: root
type: disk
path: /
pool: default
- name: eth0
type: nic
network: incusbr0
- name: Remove profile
damex.incus.incus_profile:
name: base
state: absent