ansible / ansible.builtin / v2.9.27 / module / zfs_facts Gather facts about ZFS datasets. | "added in version" 2.3 of ansible.builtin" Authors: Adam Števko (@xen0l) preview | supported by communityansible.builtin.zfs_facts (v2.9.27) — module
pip
Install with pip install ansible==2.9.27
Gather facts from ZFS dataset properties.
- name: Gather facts about ZFS dataset rpool/export/home zfs_facts: dataset: rpool/export/home
- name: Report space usage on ZFS filesystems under data/home zfs_facts: name: data/home recurse: yes type: filesystem
- debug: msg: 'ZFS dataset {{ item.name }} consumes {{ item.used }} of disk space.' with_items: '{{ ansible_zfs_datasets }}'
name: aliases: - ds - dataset description: - ZFS dataset name. required: true type: choices: - all - filesystem - volume - snapshot - bookmark default: all description: - Specifies which datasets types to display. Multiple values have to be provided in comma-separated form. depth: description: - Specifies recursion depth. recurse: default: 'no' description: - Specifies if properties for any children should be recursively displayed. type: bool parsable: default: 'no' description: - Specifies if property values should be displayed in machine friendly format. type: bool properties: aliases: - props default: all description: - Specifies which dataset properties should be queried in comma-separated format. For more information about dataset properties, check zfs(1M) man page.
name: description: ZFS dataset name returned: always sample: rpool/var/spool type: str parsable: description: if parsable output should be provided in machine friendly format. returned: if 'parsable' is set to True sample: true type: bool recurse: description: if we should recurse over ZFS dataset returned: if 'recurse' is set to True sample: true type: bool zfs_datasets: description: ZFS dataset facts returned: always sample: aclinherit: restricted aclmode: discard atime: 'on' available: 43.8G canmount: 'on' casesensitivity: sensitive checksum: 'on' compression: 'off' compressratio: 1.00x copies: '1' creation: Thu Jun 16 11:37 2016 dedup: 'off' devices: 'on' exec: 'on' filesystem_count: none filesystem_limit: none logbias: latency logicalreferenced: 18.5K logicalused: 3.45G mlslabel: none mounted: 'yes' mountpoint: /rpool name: rpool nbmand: 'off' normalization: none org.openindiana.caiman:install: ready primarycache: all quota: none readonly: 'off' recordsize: 128K redundant_metadata: all refcompressratio: 1.00x referenced: 29.5K refquota: none refreservation: none reservation: none secondarycache: all setuid: 'on' sharenfs: 'off' sharesmb: 'off' snapdir: hidden snapshot_count: none snapshot_limit: none sync: standard type: filesystem used: 4.41G usedbychildren: 4.41G usedbydataset: 29.5K usedbyrefreservation: '0' usedbysnapshots: '0' utf8only: 'off' version: '5' vscan: 'off' written: 29.5K xattr: 'on' zoned: 'off' type: str