ansible/ansible — pull request #3083 by mvo5 (2013-05-31 19:22:08+00:00)
Title: add "size_{total,free}" to the "mount" facts

This tiny branch adds size_{total,free} to the "ansible_mounts" facts via os.statvfs().

I was looking into writing a ansible helper that will warn about hosts with a full /boot partition and noticed that it seems to be not part of the standard facts gathering. Writing a custom facts modul is trivial of course but I wondered if the size information is useful for more people so I pushed this branch. If you feel it does not fit well into the standard facts gathering that is fine of course and I will just write my custom module :)

The new output looks something like this:
"ansible_mounts": [
{
"device": "/dev/sda1",
"fstype": "ext4",
"mount": "/",
"options": "rw,errors=remount-ro",
"size_available": 75809128448,
"size_total": 241773051904
}