damex.incus.incus_storages role – Ensure Incus storages.

Note

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

Entry point main – Ensure Incus storages.

Synopsis

  • Ensure Incus storages.

Parameters

Parameter

Comments

incus_storages

list / elements=dictionary

List of 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

Whether to use RBD lightweight clones.

Choices:

  • false

  • true

ceph.rbd.du

boolean

Whether to use 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

Whether to enable fscache for CephFS.

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

Path to the RADOS Gateway endpoint certificate.

cephobject.user.name

string

Ceph object store user name.

drbd.auto_add_quorum_tiebreaker

boolean

Whether to automatically add a 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

Whether to use an 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

Whether to use compression for rsync.

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

Whether to use TrueNAS lightweight clones.

Choices:

  • false

  • true

truenas.config

string

Path to the TrueNAS configuration file.

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

Whether to use ZFS lightweight clones.

Choices:

  • false

  • true

zfs.export

boolean

Whether to export the ZFS pool 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"

incus_storages_client_cert

path

Path to the TLS client certificate.

incus_storages_client_key

path

Path to the TLS client key.

incus_storages_project

string

Incus project to scope storage pools to.

incus_storages_server_cert

path

Path to the TLS server certificate.

incus_storages_socket_path

path

Path to the Incus Unix socket.

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

Whether to validate TLS certificates.

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