damex.incus.incus_storage module – Ensure Incus storage
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_storage.
Synopsis
Create, update, and delete Incus storage pools via the Incus REST API.
Storage pools are global resources, not project-scoped.
The storage driver is set on creation and cannot be changed afterwards.
Parameters
Parameter |
Comments |
|---|---|
Path to the client certificate for remote authentication. Requires |
|
Path to the client key for remote authentication. Requires |
|
Storage pool configuration key-value pairs. Boolean values are converted to lowercase strings. Default: |
|
Mount options for the Btrfs filesystem. |
|
Name of the Ceph cluster. |
|
Name of the Ceph OSD data pool. |
|
Name of the Ceph OSD placement group. |
|
Name of the Ceph OSD pool. |
|
Whether to use RBD lightweight clones. Choices:
|
|
Whether to use RBD disk usage tracking. Choices:
|
|
RBD image features to enable. |
|
Ceph user name. |
|
Name of the CephFS cluster. |
|
Create missing CephFS pools. Choices:
|
|
Name of the CephFS data pool. |
|
Whether to enable fscache for CephFS. Choices:
|
|
Name of the CephFS metadata pool. |
|
Number of placement groups for CephFS OSD pools. |
|
CephFS path to mount. |
|
CephFS user name. |
|
Prefix for Ceph object store bucket names. |
|
Name of the Ceph object store cluster. |
|
URL of the RADOS Gateway endpoint. |
|
Path to the RADOS Gateway endpoint certificate. |
|
Ceph object store user name. |
|
Whether to automatically add a DRBD quorum tiebreaker. Choices:
|
|
Automatic diskful mode for DRBD. |
|
Action to take when DRBD has no quorum. |
|
Name of the LINSTOR resource group. |
|
Number of replicas in the LINSTOR resource group. |
|
LINSTOR storage pool for the resource group. |
|
Prefix for LINSTOR volume names. |
|
Size of the LVM metadata volume. |
|
Size of the LVM thin pool metadata volume. |
|
Name of the LVM thin pool. |
|
Whether to use an LVM thin pool. Choices:
|
|
Force reuse of an existing LVM volume group. Choices:
|
|
Name of the LVM volume group. |
|
Upper limit on the bandwidth for rsync. |
|
Whether to use compression for rsync. Choices:
|
|
Size of the storage pool. |
|
Path or device to use as storage source. |
|
Wipe the source device before use. Choices:
|
|
Allow insecure connections to TrueNAS. Choices:
|
|
API key for TrueNAS authentication. |
|
Whether to use TrueNAS lightweight clones. Choices:
|
|
Path to the TrueNAS configuration file. |
|
Name of the TrueNAS dataset. |
|
Force reuse of an existing TrueNAS dataset. Choices:
|
|
Hostname or IP of the TrueNAS server. |
|
iSCSI initiator name for TrueNAS. |
|
iSCSI portal ID for TrueNAS. |
|
Block size for the ZFS pool. |
|
Whether to use ZFS lightweight clones. Choices:
|
|
Whether to export the ZFS pool on removal. Choices:
|
|
Name of the ZFS pool. |
|
Storage pool description. Default: |
|
Storage driver. Required when creating a new storage pool. Ignored on update — driver cannot be changed after creation. Choices:
|
|
Name of the storage pool. |
|
Path to the server certificate for remote verification. Requires |
|
Path to the Incus Unix socket for local connections. Default: |
|
Desired state of the storage pool. 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 dir storage pool
damex.incus.incus_storage:
name: default
driver: dir
- name: Create ZFS storage pool
damex.incus.incus_storage:
name: tank
driver: zfs
config:
zfs.pool_name: tank
- name: Remove storage pool
damex.incus.incus_storage:
name: default
state: absent