community.general.lxd_storage_pool_info module – Retrieve information about LXD storage pools
Note
This module is part of the community.general collection (version 12.6.1).
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_pool_info.
New in community.general 12.1.0
Synopsis
- Retrieve information about LXD storage pools.
- This module returns details about all storage pools or a specific storage pool.
Parameters
Parameter | Comments |
|---|---|
client_cert aliases: cert_file path | The client certificate file path. If not specified, it defaults to |
client_key aliases: key_file path | The client certificate key file path. If not specified, it defaults to |
name string | Name of a specific storage pool to retrieve information about. If not specified, information about all storage pools are returned. |
project string | Project of the storage pool. See https://documentation.ubuntu.com/lxd/en/latest/projects/. |
snap_url string | The Unix domain socket path when LXD is installed by snap package manager. Default: |
trust_password string | The client trusted password. You need to set this password on the LXD server before running this module using the following command: If |
type list / elements=string | Filter storage pools by driver/type (for example If not specified, all storage pool types are returned. Can be a single type or a list of types. Default: |
url string | The Unix domain socket path or the https URL for the LXD server. Default: |
Attributes
Attribute | Support | Description |
|---|---|---|
check_mode | Support: full This action does not modify state. | Can run in |
diff_mode | 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 storage pools
community.general.lxd_storage_pool_info:
register: result
- name: Get information about a specific storage pool
community.general.lxd_storage_pool_info:
name: default
register: result
- name: Get information about all ZFS storage pools
community.general.lxd_storage_pool_info:
type:
- zfs
- ceph
register: result
- name: Get information about ZFS and BTRFS storage pools
community.general.lxd_storage_pool_info:
type:
- zfs
- btrfs
register: result
- name: Get storage pool information via HTTPS connection
community.general.lxd_storage_pool_info:
url: https://127.0.0.1:8443
trust_password: mypassword
name: default
register: result
- name: Get storage pool information for a specific project
community.general.lxd_storage_pool_info:
project: myproject
register: result
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
logs list / elements=dictionary | The logs of requests and responses. Returned: when ansible-playbook is invoked with -vvvv. Sample: |
storage_pools list / elements=dictionary | List of LXD storage pools. Returned: success Sample: |
|
config dictionary |
Configuration of the storage pool. Returned: success |
|
description string |
Description of the storage pool. Returned: success |
|
driver string |
The storage pool driver/type. Returned: success |
|
locations list / elements=string |
Cluster member locations for the pool. Returned: success |
|
name string |
The name of the storage pool. Returned: success |
|
status string |
Current status of the storage pool. Returned: success |
|
used_by list / elements=string |
List of resources using this storage pool. Returned: success |
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/community/general/lxd_storage_pool_info_module.html