diff --git a/tasks/hostname.yml b/tasks/hostname.yml index 0cfcabd..102a00f 100644 --- a/tasks/hostname.yml +++ b/tasks/hostname.yml @@ -20,7 +20,7 @@ {% for cpu in ansible_processor %} - {{ cpu }} {% endfor %} - + # ---------------------------------------------------------------------- # 2. NETWORK INFORMATION # ---------------------------------------------------------------------- @@ -48,16 +48,23 @@ # ---------------------------------------------------------------------- # 3. STORAGE INFORMATION # ---------------------------------------------------------------------- - - name: Show Mounted Filesystems + - name: Display Mounted Filesystems Summary (Safely) ansible.builtin.debug: msg: | - Mounted Filesystems: - {% for mount in ansible_mounts %} - - Mount Point : {{ mount.mount }} - Device : {{ mount.device }} - Fstype : {{ mount.fstype }} - Size Total : {{ mount.size_total | int // (1024*1024) }} MB - Size Used : {{ mount.size_used | int // (1024*1024) }} MB + 💾 Mounted Filesystems + ------------------------- + {% for mount in ansible_mounts and mount.fstype not in ['tmpfs', 'overlay', 'squashfs']%} + 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']%} + 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 + {% else %} + Size Info : Not Available + {% endif %} + ------------------------- {% endfor %} # ----------------------------------------------------------------------