Playbook to display free space

This commit is contained in:
2023-12-05 17:21:57 +05:30
parent 9656cfc002
commit b977e2ddb5

8
playbooks/disk-space.yml Normal file
View File

@@ -0,0 +1,8 @@
---
- name: Check disk space
hosts: all
tasks:
- name: Check free disk space
shell: df -kh / | tail -n1 | awk '{print $5}'
register: free
- debug: var=free.stdout_lines