Skip to content

Commit

Permalink
Adding a check on the type of the tunable, so that things like 'notif…
Browse files Browse the repository at this point in the history
…ication_email' can be set directly and not on a subcomponent.
  • Loading branch information
Gabe McArthur committed Feb 13, 2013
1 parent a3b94e3 commit e36882c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions templates/default/chef-server.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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.