zpool_facts - Gather facts about ZFS pools.

New in version 2.3.


  • Gather facts from ZFS pool properties.


parameter required default choices comments
ZFS pool name.

aliases: pool, zpool
  • yes
  • no
Specifies if property values should be displayed in machine friendly format.
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


# 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 {{ }} has {{ }} 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
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', [email protected]': 'enabled', 'delegation': 'on', 'dedupditto': '0', 'dedupratio': '1.00x', 'autoexpand': 'off', [email protected]': 'enabled', 'allocated': '3.46G', 'guid': '15729052870819522408', [email protected]_blocks': 'enabled', [email protected]_compress': 'active', [email protected]_txg': 'active', 'autoreplace': 'off', 'capacity': '6%', [email protected]_vdev_crash_dump': 'enabled', [email protected]_dataset': 'enabled', 'cachefile': '-', 'bootfs': 'rpool/ROOT/openindiana', [email protected]_birth': 'active', 'readonly': 'off', 'version': '-', 'health': 'ONLINE', 'expandsize': '-', [email protected]_data': 'active', 'size': '49.8G', [email protected]_destroy': 'enabled', [email protected]': 'enabled', [email protected]_bpobj': 'active', [email protected]_histogram': 'active', 'free': '46.3G', 'failmode': 'wait', [email protected]_limits': 'enabled', [email protected]': 'enabled', 'altroot': '-', 'fragmentation': '3%', 'name': 'rpool'}
name ZFS pool name always string rpool


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


This module is community maintained without core committer oversight.

For more information on what this means please read Module Support

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