Permalink
Browse files

Adding a check on the type of the tunable, so that things like 'notif…

…ication_email' can be set directly and not on a subcomponent.
  • Loading branch information...
1 parent a3b94e3 commit e36882c0a5c89ba8b891e8d1cfca62c6bf60ee38 Gabe McArthur committed Feb 13, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 templates/default/chef-server.rb.erb
@@ -5,8 +5,13 @@ topology "standalone"
api_fqdn "<%= node['chef-server']['api_fqdn'] %>"
<% node['chef-server']['configuration'].each_pair do |component, tunables| -%>
+<% case tunables -%>
+<% when Hash -%>
<% tunables.each_pair do |name, value| -%>
<% value = %Q["#{value}"] if value.kind_of?(String) -%>
<%= "#{component.gsub("-","_")}['#{name}'] = #{value}" %>
<% end -%>
+<% when String -%>
+<%= component.gsub('-', '_') %> "<%= tunables %>"
+<% end -%>
<% end -%>

0 comments on commit e36882c

Please sign in to comment.