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