fix 🐛: Update hostname task to correctly display size used and available for each mount point.

Fixes the issue where the `hostname` task did not correctly display the size used and available for each mount point. This was due to incorrect handling of the `size_used` and `size_total` variables in the template.
This commit is contained in:
2025-10-12 08:00:09 +02:00
parent f2a730476a
commit c312844348

View File

@@ -57,7 +57,7 @@
Mount Point : {{ mount.mount }}
Device : {{ mount.device }}
Fstype : {{ mount.fstype }}
{% if 'size_used' in mount and 'size_total' in mount and mount.fstype not in ['tmpfs', 'overlay', 'squashfs'] %}
{% if mount.size_total is defined and mount.size_used is defined and mount.fstype not in ['tmpfs', 'overlay', 'squashfs'] %}
Size Total : {{ (mount.size_total | int // (1024 * 1024)) }} MB
Size Used : {{ (mount.size_used | int // (1024 * 1024)) }} MB
Size Avail : {{ ((mount.size_total | int - mount.size_used | int) // (1024 * 1024)) }} MB
@@ -67,7 +67,6 @@
-------------------------
{% endfor %}
# ----------------------------------------------------------------------
# 4. CURRENT USER DETAILS
# ----------------------------------------------------------------------