From d7d864aef4847f076e7b048206cad175e9bbb9f9 Mon Sep 17 00:00:00 2001 From: mojoaar Date: Thu, 17 Jul 2025 10:18:17 +0000 Subject: [PATCH] Update gather.yml --- gather.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gather.yml b/gather.yml index 8710b8b..96b0548 100644 --- a/gather.yml +++ b/gather.yml @@ -16,4 +16,15 @@ - name: Check network interface information debug: - msg: "IP Address is {{ ansible_default_ipv4.address }}" \ No newline at end of file + msg: "IP Address is {{ ansible_default_ipv4.address }}" + + - name: Get disk space info for / + set_fact: + root_space_info: "{{ item }}" + loop: "{{ ansible_mounts }}" + when: item.mount == "/" + + - name: Display disk space information + debug: + msg: "Free space on /: {{ (root_space_info.size_available / 1024**3) | round(2) }} GB" + when: root_space_info is defined \ No newline at end of file