mirror of
https://github.com/kneutron/ansitest.git
synced 2025-01-16 04:42:55 +08:00
12 lines
349 B
YAML
12 lines
349 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 / |grep -v Use |awk '{print $5}'
|
|
register: dfroot
|
|
|
|
- debug:
|
|
msg: "System {{ inventory_hostname }}'s root FS utilization is {{ dfroot.stdout }}"
|