#9 convert attrib templates

Adds templates
Convert the factor code to Ohai plugin.
Ah, I did not notice the change to metadata.rb, thanks, corrected.