damex.incus.incus_storage_volumes role – Ensure Incus storage volumes.
Note
This role is part of the damex.incus collection (version 1.8.9).
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 |
|---|---|
List of storage volumes to ensure. |
|
Storage volume configuration options. |
|
Filesystem type for block volumes. |
|
Mount options for block volumes. |
|
Size of the storage volume. |
|
Automatic expiry time for snapshots. |
|
Pongo2 template for snapshot names. |
|
Cron expression for automatic snapshots. |
|
Whether to use a ZFS volume as a block device. Choices:
|
|
Block size for the ZFS volume. |
|
Whether to delegate ZFS dataset to the instance. Choices:
|
|
Whether to remove snapshots on volume removal. Choices:
|
|
Content type of the storage volume. Choices:
|
|
Storage volume description. |
|
Name of the storage volume. |
|
Name of the storage pool containing the volume. |
|
Project to scope the storage volume to. |
|
Desired state of the storage volume. Choices:
|
|
List of cluster members to create the storage volume on. |
|
Per-member storage volume configuration options. |
|
Size of the storage volume. |
|
Name of the cluster member. |
|
Path to the TLS client certificate. |
|
Path to the TLS client key. |
|
Incus project to scope storage volumes to. |
|
Path to the TLS server certificate. |
|
Path to the Incus Unix socket. |
|
Desired state of the storage volumes. Choices:
|
|
Authentication token for the Incus API. |
|
URL of the Incus server API. |
|
Whether to validate TLS certificates. 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