#9 convert attrib templates

Adds templates
Convert the factor code to Ohai plugin.
why ternary? isn't if/then/end more canonical in ruby?