]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/munin/libraries/expand.rb
Fix indentation
[chef.git] / cookbooks / munin / libraries / expand.rb
index dcd73cb69d77afb8b5dbbab1cf152a90992952b9..4dadd14d38dfbc9f53c92ef4d933bd2a23eebeb5 100644 (file)
@@ -5,7 +5,7 @@ class Chef
         if node.is_a?(Hash)
           template.gsub(/%%([^%]+)%%/) { node[Regexp.last_match[1].to_sym] }
         else
         if node.is_a?(Hash)
           template.gsub(/%%([^%]+)%%/) { node[Regexp.last_match[1].to_sym] }
         else
-          template.gsub("%%", node)
+          template.gsub("%%%", node.tr("-", "_")).gsub("%%", node)
         end
       end.join(" ")
     end
         end
       end.join(" ")
     end