partitions.rb

Path: lib/facter/partitions.rb
Last Update: Sat Feb 23 07:17:42 +0000 2019

Fact: partitions

Purpose:

  Return the details of the disk partitions.

  This fact is structured. Values are returned as a group of key-value pairs.

Resolution:

  Parse the contents of `/sys/block/<device>/size` to receive the size (multiplying by 512 to correct for blocks-to-bytes).

Caveats:

  For Linux, only 2.6+ is supported at this time due to the reliance on sysfs.

Required files

facter   facter/util/partitions  

[Validate]