From c3128443484378c62a9a538a3702cb7d6f292f95 Mon Sep 17 00:00:00 2001 From: Jose Date: Sun, 12 Oct 2025 08:00:09 +0200 Subject: [PATCH] =?UTF-8?q?fix=20=F0=9F=90=9B:=20Update=20hostname=20task?= =?UTF-8?q?=20to=20correctly=20display=20size=20used=20and=20available=20f?= =?UTF-8?q?or=20each=20mount=20point.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- tasks/hostname.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tasks/hostname.yml b/tasks/hostname.yml index 58cc82d..d84ca23 100644 --- a/tasks/hostname.yml +++ b/tasks/hostname.yml @@ -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 # ----------------------------------------------------------------------