Get disk space information

This commit is contained in:
Aritra Dalal
2026-04-20 17:10:55 +01:00
parent 86e8637bab
commit a89bb06e1f

14
disk_space.yml Normal file
View File

@@ -0,0 +1,14 @@
---
- name: Report Disk Space Availability
hosts: all
gather_facts: yes
tasks:
- name: Display available disk spaces for all mounts
ansible.builtin.debug:
msg: >
Mount: {{ item.mount }} |
Size Total: {{ (item.size_total / 1024 / 1024 / 1024) | round(2) }} GB |
Size Available: {{ (item.size_available / 1024 / 1024/ 1204) | round(2) }} GB
loop: "{{ ansible_mounts }}"
loop_control:
label: "{{ item.mount }}"