Hey Guys,
I'm trying to pull data from an array using the 'mountpoints' facter
$root_partition = $mountpoints.filter |$values| { $values[0] =~ "/$" }
the results I get are:
Notice: {/ => {device => /dev/mapper/ubuntu--vg-ubuntu--lv, filesystem => ext4, options => [rw, relatime], size_bytes => 262901354496, available_bytes => 240302788608, used_bytes => 11734274048, capacity => 4.66%, size => 244.85 GiB, available => 223.80 GiB, used => 10.93 GiB}}
Notice: /Stage[main]/Disk_usage/Notify[{/ => {device => /dev/mapper/ubuntu--vg-ubuntu--lv, filesystem => ext4, options => [rw, relatime], size_bytes => 262901354496, available_bytes => 240302788608, used_bytes => 11734274048, capacity => 4.66%, size => 244.85 GiB, available => 223.80 GiB, used => 10.93 GiB}}]/message: defined 'message' as '{/ => {device => /dev/mapper/ubuntu--vg-ubuntu--lv, filesystem => ext4, options => [rw, relatime], size_bytes => 262901354496, available_bytes => 240302788608, used_bytes => 11734274048, capacity => 4.66%, size => 244.85 GiB, available => 223.80 GiB, used => 10.93 GiB}}'
What I need is the get the 'capacity' value out of it.
Thanks!
Nir.