zpool_facts - Gather facts about ZFS pools.

New in version 2.3.

Synopsis

  • Gather facts from ZFS pool properties.

Options

parameter required default choices comments
name
no
ZFS pool name.
aliases: pool, zpool
parsable
no
  • yes
  • no
Specifies if property values should be displayed in machine friendly format.
properties
no all
Specifies which dataset properties should be queried in comma-separated format. For more information about dataset properties, check zpool(1M) man page.
aliases: props

Examples

# Gather facts about ZFS pool rpool
zpool_facts: pool=rpool

# Gather space usage about all imported ZFS pools
zpool_facts: properties='free,size'
debug: msg='ZFS pool {{ item.name }} has {{ item.free }} free space out of {{ item.size }}.'
with_items: '{{ ansible_zfs_pools }}'

Return Values

Common return values are documented here Return Values, the following are the fields unique to this module:

name description returned type sample
name
ZFS pool name
always string rpool
parsable
if parsable output should be provided in machine friendly format.
if 'parsable' is set to True boolean True
zfs_pools
ZFS pool facts
always string {'comment': '-', 'freeing': '0', 'listsnapshots': 'off', 'leaked': '0', 'feature@sha512': 'enabled', 'delegation': 'on', 'dedupditto': '0', 'dedupratio': '1.00x', 'autoexpand': 'off', 'feature@bookmarks': 'enabled', 'allocated': '3.46G', 'guid': '15729052870819522408', 'feature@large_blocks': 'enabled', 'feature@lz4_compress': 'active', 'feature@enabled_txg': 'active', 'autoreplace': 'off', 'capacity': '6%', 'feature@multi_vdev_crash_dump': 'enabled', 'feature@extensible_dataset': 'enabled', 'cachefile': '-', 'bootfs': 'rpool/ROOT/openindiana', 'feature@hole_birth': 'active', 'readonly': 'off', 'version': '-', 'health': 'ONLINE', 'expandsize': '-', 'feature@embedded_data': 'active', 'size': '49.8G', 'feature@async_destroy': 'enabled', 'feature@skein': 'enabled', 'feature@empty_bpobj': 'active', 'feature@spacemap_histogram': 'active', 'free': '46.3G', 'failmode': 'wait', 'feature@filesystem_limits': 'enabled', 'feature@edonr': 'enabled', 'altroot': '-', 'fragmentation': '3%', 'name': 'rpool'}

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/zpool_facts_module.html