mirror of
https://github.com/kneutron/ansitest.git
synced 2025-01-16 04:42:55 +08:00
12 lines
353 B
YAML
12 lines
353 B
YAML
---
|
|
- 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 }}"
|