damex.incus.incus_storages role – Ensure Incus storages.

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_storages.

Entry point main – Ensure Incus storages.

Synopsis

  • Ensure Incus storages.

Parameters

Parameter

Comments

incus_storages

list / elements=dictionary

Storage pools to ensure.

config

dictionary

Storage pool configuration options.

btrfs.mount_options

string

Mount options for the Btrfs filesystem.

ceph.cluster_name

string

Name of the Ceph cluster.

ceph.osd.data_pool_name

string

Name of the Ceph OSD data pool.

ceph.osd.pg_name

string

Name of the Ceph OSD placement group.

ceph.osd.pool_name

string

Name of the Ceph OSD pool.

ceph.rbd.clone_copy

boolean

RBD lightweight clones.

Choices:

  • false

  • true

ceph.rbd.du

boolean

RBD disk usage tracking.

Choices:

  • false

  • true

ceph.rbd.features

string

RBD image features to enable.

ceph.user.name

string

Ceph user name.

cephfs.cluster_name

string

Name of the CephFS cluster.

cephfs.create_missing

boolean

Create missing CephFS pools.

Choices:

  • false

  • true

cephfs.data_pool

string

Name of the CephFS data pool.

cephfs.fscache

boolean

CephFS fscache.

Choices:

  • false

  • true

cephfs.meta_pool

string

Name of the CephFS metadata pool.

cephfs.osd_pg_num

string

Number of placement groups for CephFS OSD pools.

cephfs.path

string

CephFS path to mount.

cephfs.user.name

string

CephFS user name.

cephobject.bucket_name_prefix

string

Prefix for Ceph object store bucket names.

cephobject.cluster_name

string

Name of the Ceph object store cluster.

cephobject.radosgw.endpoint

string

URL of the RADOS Gateway endpoint.

cephobject.radosgw.endpoint_cert_file

string

RADOS Gateway endpoint certificate path.

cephobject.user.name

string

Ceph object store user name.

drbd.auto_add_quorum_tiebreaker

boolean

Automatic DRBD quorum tiebreaker.

Choices:

  • false

  • true

drbd.auto_diskful

string

Automatic diskful mode for DRBD.

drbd.on_no_quorum

string

Action to take when DRBD has no quorum.

linstor.resource_group.name

string

Name of the LINSTOR resource group.

linstor.resource_group.place_count

integer

Number of replicas in the LINSTOR resource group.

linstor.resource_group.storage_pool

string

LINSTOR storage pool for the resource group.

linstor.volume.prefix

string

Prefix for LINSTOR volume names.

lvm.metadata_size

string

Size of the LVM metadata volume.

lvm.thinpool_metadata_size

string

Size of the LVM thin pool metadata volume.

lvm.thinpool_name

string

Name of the LVM thin pool.

lvm.use_thinpool

boolean

LVM thin pool.

Choices:

  • false

  • true

lvm.vg.force_reuse

boolean

Force reuse of an existing LVM volume group.

Choices:

  • false

  • true

lvm.vg_name

string

Name of the LVM volume group.

rsync.bwlimit

string

Upper limit on the bandwidth for rsync.

rsync.compression

boolean

Rsync compression.

Choices:

  • false

  • true

size

string

Size of the storage pool.

source

string

Path or device to use as storage source.

source.wipe

boolean

Wipe the source device before use.

Choices:

  • false

  • true

truenas.allow_insecure

boolean

Allow insecure connections to TrueNAS.

Choices:

  • false

  • true

truenas.api_key

string

API key for TrueNAS authentication.

truenas.clone_copy

boolean

TrueNAS lightweight clones.

Choices:

  • false

  • true

truenas.config

string

TrueNAS configuration file path.

truenas.dataset

string

Name of the TrueNAS dataset.

truenas.force_reuse

boolean

Force reuse of an existing TrueNAS dataset.

Choices:

  • false

  • true

truenas.host

string

Hostname or IP of the TrueNAS server.

truenas.initiator

string

iSCSI initiator name for TrueNAS.

truenas.portal

string

iSCSI portal ID for TrueNAS.

zfs.blocksize

string

Block size for the ZFS pool.

zfs.clone_copy

boolean

ZFS lightweight clones.

Choices:

  • false

  • true

zfs.export

boolean

ZFS pool export on removal.

Choices:

  • false

  • true

zfs.pool_name

string

Name of the ZFS pool.

description

string

Storage pool description.

driver

string / required

Storage driver to use.

Choices:

  • "dir"

  • "btrfs"

  • "lvm"

  • "zfs"

  • "ceph"

  • "cephfs"

  • "cephobject"

  • "linstor"

  • "truenas"

name

string / required

Name of the storage pool.

project

string

Project to scope the storage pool to.

state

string

Desired state of the storage pool.

Choices:

  • "present"

  • "absent"

targets

list / elements=dictionary

Cluster members to create the storage pool on.

config

dictionary

Per-member storage pool configuration options.

lvm.thinpool_name

string

Name of the LVM thin pool.

lvm.vg_name

string

Name of the LVM volume group.

size

string

Size of the storage pool.

source

string

Path or device to use as storage source.

zfs.pool_name

string

Name of the ZFS pool.

name

string / required

Name of the cluster member.

state

string

Desired state of this cluster member’s storage pool entry.

Choices:

  • "present"

  • "absent"

incus_storages_client_cert

string

Client certificate content for API authentication.

incus_storages_client_cert_path

path

TLS client certificate path for API authentication.

incus_storages_client_key

string

Client key content for API authentication.

incus_storages_client_key_path

path

TLS client key path for API authentication.

incus_storages_project

string

Incus project to scope storage pools to.

incus_storages_server_cert

string

Server certificate content for API verification.

incus_storages_server_cert_path

path

TLS server certificate path for API verification.

incus_storages_socket_path

path

Incus Unix socket path.

incus_storages_state

string

Desired state of the storage pools.

Choices:

  • "present"

  • "absent"

incus_storages_token

string

Authentication token for the Incus API.

incus_storages_url

string

URL of the Incus server API.

incus_storages_validate_certs

boolean

TLS certificate validation.

Choices:

  • false

  • true

Examples

- name: Ensure incus storages
  hosts: incus
  tasks:
    - name: Ensure incus storages
      ansible.builtin.import_role:
        name: damex.incus.incus_storages
      vars:
        incus_storages:
          - name: local
            driver: dir
          - name: data
            driver: zfs
            config:
              source: tank/incus
          - name: cluster-data
            driver: dir
            targets:
              - name: node1.example.com
              - name: node2.example.com
                config:
                  source: /mnt/data