community.general.lxd_storage_volume_info module – Retrieve information about LXD storage volumes
Note
This module is part of the community.general collection (version 12.2.0).
You might already have this collection installed if you are using the ansible package.
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 community.general.
To use it in a playbook, specify: community.general.lxd_storage_volume_info.
New in community.general 12.1.0
Synopsis
Retrieve information about LXD storage volumes in a specific storage pool.
This module returns details about all volumes or a specific volume in a pool.
Parameters
Parameter |
Comments |
|---|---|
The client certificate file path. If not specified, it defaults to |
|
The client certificate key file path. If not specified, it defaults to |
|
Name of a specific storage volume to retrieve information about. If not specified, information about all volumes in the pool are returned. |
|
Name of the storage pool to query for volumes. This parameter is required. |
|
Project of the storage volume. See https://documentation.ubuntu.com/lxd/en/latest/projects/. |
|
The Unix domain socket path when LXD is installed by snap package manager. Default: |
|
The client trusted password. You need to set this password on the LXD server before running this module using the following command: If |
|
Filter volumes by type. Common types include If not specified, all volume types are returned. |
|
The Unix domain socket path or the https URL for the LXD server. Default: |
Attributes
Attribute |
Support |
Description |
|---|---|---|
Support: full This action does not modify state. |
Can run in |
|
Support: none This action does not modify state. |
Returns details on what has changed (or possibly needs changing in |
Examples
- name: Get information about all volumes in the default storage pool
community.general.lxd_storage_volume_info:
pool: default
register: result
- name: Get information about a specific volume
community.general.lxd_storage_volume_info:
pool: default
name: my-volume
register: result
- name: Get information about all custom volumes in a pool
community.general.lxd_storage_volume_info:
pool: default
type: custom
register: result
- name: Get volume information via HTTPS connection
community.general.lxd_storage_volume_info:
url: https://127.0.0.1:8443
trust_password: mypassword
pool: default
name: my-volume
register: result
- name: Get volume information for a specific project
community.general.lxd_storage_volume_info:
project: myproject
pool: default
register: result
- name: Get container volumes only
community.general.lxd_storage_volume_info:
pool: default
type: container
register: result
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
The logs of requests and responses. Returned: when ansible-playbook is invoked with -vvvv. Sample: |
|
List of LXD storage volumes. Returned: success Sample: |
|
Configuration of the storage volume. Returned: success |
|
Content type of the volume (filesystem or block). Returned: success |
|
Description of the storage volume. Returned: success |
|
Cluster member location for the volume. Returned: success |
|
The name of the storage volume. Returned: success |
|
The type of the storage volume. Returned: success |
|
List of resources using this storage volume. Returned: success |