puppetlabs/cfacter — pull request #100 by whopper (2014-08-25 20:53:10+00:00)
Title: (Review) (CFACT-64) Add structured operating system fact

This commit adds a new 'os' structured fact, which returns a map
including keys for each of the operatingsystem-releated facts. The
fact also includes LSB keys in Linux systems where LSB is available.

Note: I'm putting this PR up in order to collect feedback on how we should resolve the OS structured facts. The code in its current state is complete, and the fact is functional, but I'm not sure how I feel about its resolution. I've added `determine_*` helper functions to actually interrogate the system, while the `resolve_operating_system*` functions are still of type void and actually add the facts as collected from the structured operating system fact.

The structured fact uses the helper functions to gather its data, and simply takes values from the LSB facts. This approach feels inconsistent, but it didn't feel right to just bring the LSB implementations over into the operating system resolvers.

TL;DR, I'm open for thoughts and feedback on the best way to organize this structuring!