I am trying to get a root partition (mount => "/")
name using Puppet facter.
When I run "facter partitions
", it shows three partitions.
I would like to get the variable "sda3" from the result.
{
/dev/sda1 => {
size => "1.00 MiB",
size_bytes => 1048576
},
/dev/sda2 => {
filesystem => "ext2",
mount => "/boot",
size => "477.00 MiB",
size_bytes => 500170752,
uuid => "8345d60e-e09a-4723-b5a6-149f4002706d"
},
/dev/sda3 => {
filesystem => "ext4",
mount => "/",
size => "49.71 GiB",
size_bytes => 53376712704,
uuid => "a1330fb2-7f13-417e-8908-813b1fdae911"
},
I tried $hddname = $facts['partitions']['mount'] == "/"
, but got an error.
Do you guys have any idea?