How to access hierarchical facts from facter?

asked 2017-09-21 04:19:31 -0600

deric gravatar image

I'd like to create a custom fact derived from another fact. With facter 2.x other facts are accessible via:

Facter.value(:memorysize)

But how do I access hierarchical facts from Ruby code? e.g.:

memory:
  system:
    available: 29.70 GiB
    available_bytes: 31890997248
    capacity: 5.12%
    total: 31.30 GiB
    total_bytes: 33612447744
    used: 1.60 GiB
    used_bytes: 1721450496
edit retag flag offensive close merge delete