Can you wrap this in the Ohai.plugin block and add a collect_data method? See http://docs.opscode.com/ohai.html