--- - hosts: all gather_facts: no tasks: - name: ZFS-aware Root FS usage shell: [ $(df -hT / |grep -c zfs) -gt 0 ] && zpool list rpool |grep -v ALLOC |awk '(print $3)' || df -h / |awk ' { print $5 } ' |grep -v Use register: dfroot - debug: msg: "System {{ inventory_hostname }}'s root FS utilization is {{ dfroot.stdout }}"