1 2 3 4 5 6 7
# return the list of disks Facter.add("disks") do confine :kernel => :linux setcode do `egrep '[sh]d[a-z]+$' /proc/partitions | awk '{ print $4 }' | xargs`.split(' ') end end