Update gather.yml
This commit is contained in:
parent
344e2e5431
commit
d7d864aef4
1 changed files with 12 additions and 1 deletions
11
gather.yml
11
gather.yml
|
|
@ -17,3 +17,14 @@
|
|||
- name: Check network interface information
|
||||
debug:
|
||||
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
|
||||
Loading…
Reference in a new issue