ansitest/Demo_df-rootusage.yml
2020-05-28 19:07:17 -05:00

15 lines
400 B
YAML

---
- hosts: all
gather_facts: no
tasks:
- name: ZFSaware Root FS usage
shell: zpool list rpool |grep -v ALLOC |awk '{print $3}'
register: dfrootz
- name: nonzfs rootfs usage
shell: df -h / |grep -v "Use" |awk '{print $5}'
register: dfrootnz
- debug:
msg: "System {{ inventory_hostname }}'s root FS utilization is {{ dfrootz.stdout }} {{ dfrootnz.stdout }}"