Nested fact values can be viewed in the CLI by using a dot between variables
e.g. to retrieve os['release']['minor']
in the CLI type:
facter os.release.minor
EDIT:
Apperently this only works with facter 3.x.
This doc gives a brief mention on how to access these structured (aka nested) facts (http://docs.puppetlabs.com/facter/3.1/core_facts.html):
Legacy Facts Note: As of Facter 3, legacy facts such as architecture
are hidden by default to reduce noise in Facter’s default command-line
output. These older facts are now part of more useful structured
facts; for example, architecture is now part of the os fact and
accessible as os.architecture. You can still use these legacy facts in
Puppet manifests ($architecture), request them on the command line
(facter architecture), and view them alongside structured facts
(facter --show-legacy).
Unfortunately I cannot find information about accessing nested facts using older versions.
In facter v3 you can do the following:
facter os
{
architecture => "amd64",
distro => {
codename => "trusty",
description => "Ubuntu 14.04.3 LTS",
id => "Ubuntu",
release => {
full => "14.04",
major => "14.04"
}
},
family => "Debian",
hardware => "x86_64",
name => "Ubuntu",
release => {
full => "14.04",
major => "14.04"
},
selinux => {
enabled => false
}
}
.
facter os.release
{
full => "14.04",
major => "14.04"
}
.
facter os.release.major
14.04