]> git.openstreetmap.org Git - chef.git/blob - cookbooks/munin/libraries/expand.rb
Configure SMART attribute monitoring for direct attached SATA disks
[chef.git] / cookbooks / munin / libraries / expand.rb
1 class Chef
2   class Munin
3     def self.expand(template, nodes)
4       nodes.map do |node| 
5         if node.kind_of?(Hash)
6           template.gsub(/%%([^%]+)%%/) { node[$1.to_sym] }
7         else
8           template.gsub("%%", node)
9         end
10       end.join(" ")
11     end
12   end 
13 end