Get disk space information
This commit is contained in:
14
disk_space.yml
Normal file
14
disk_space.yml
Normal 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 }}"
|
||||
Reference in New Issue
Block a user