To gather information on filesystem usage in gigabytes using the fact module in Ansible, you can use the following playbook:
- name: Gather disk usage facts
hosts: your_host
become: true
gather_facts: true
tasks:
- name: Display disk usage
debug:
var: ansible_mounts
This playbook uses the ansible_mounts
variable in the debug
module to display the mounts on the system along with their usage and capacity in gigabytes.
Asked: 2022-01-27 11:00:00 +0000
Seen: 9 times
Last updated: Dec 17 '22