ansitest/Demo_df-rootusage.yml

15 lines
400 B
YAML
Raw Normal View History

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