damex.incus.incus_storage_volumes role – Ensure Incus storage volumes.
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_storage_volumes.
Entry point main – Ensure Incus storage volumes.
Synopsis
Ensure Incus storage volumes.
Parameters
Parameter |
Comments |
|---|---|
Storage volumes to ensure. |
|
Storage volume configuration options. |
|
Filesystem type for block volumes. |
|
Mount options for block volumes. |
|
Storage volume size. |
|
Automatic expiry time for snapshots. |
|
Pongo2 template for snapshot names. |
|
Cron expression for automatic snapshots. |
|
ZFS volume block device mode. Choices:
|
|
ZFS volume block size. |
|
ZFS dataset delegation to instance. Choices:
|
|
Snapshot removal on volume removal. Choices:
|
|
Storage volume content type. Choices:
|
|
Storage volume description. |
|
Storage volume name. |
|
Storage pool name. |
|
Incus project scope. |
|
Storage volume desired state. Choices:
|
|
Cluster member targets for storage volume creation. |
|
Per-member storage volume configuration options. |
|
Storage volume size. |
|
Cluster member name. |
|
Client certificate content for API authentication. |
|
TLS client certificate path for API authentication. |
|
Client key content for API authentication. |
|
TLS client key path for API authentication. |
|
Incus project scope. |
|
Server certificate content for API verification. |
|
TLS server certificate path for API verification. |
|
Incus Unix socket path. |
|
Storage volumes desired state. Choices:
|
|
Incus API authentication token. |
|
Incus server API URL. |
|
TLS certificate validation. Choices:
|
Examples
- name: Ensure incus storage volumes
hosts: incus
tasks:
- name: Ensure incus storage volumes
ansible.builtin.import_role:
name: damex.incus.incus_storage_volumes
vars:
incus_storage_volumes:
- name: data
pool: default
- name: media
pool: zfs
content_type: block
config:
size: "50GiB"
- name: backups
pool: default
config:
snapshots.schedule: "@daily"
snapshots.expiry: "7d"
- name: plexmediaserver
pool: local
targets:
- name: node1.example.com
config:
size: "100GiB"
- name: node2.example.com