#9 convert attrib templates

Adds templates
Convert the factor code to Ohai plugin.
Maybe in puppet? From what I've seen ternary statements are mostly preferred in ruby.