fa968542e0
With the future parser and puppet 4, explicit undef seems to be converted to blank string for erb templates This change allows you to continue to omit config options in the main my.cnf
22 lines
605 B
Text
22 lines
605 B
Text
<% @options.sort.map do |k,v| -%>
|
|
<% if v.is_a?(Hash) -%>
|
|
[<%= k %>]
|
|
<% v.sort.map do |ki, vi| -%>
|
|
<% if ki == 'ssl-disable' or (ki =~ /^ssl/ and v['ssl-disable'] == true) -%>
|
|
<% next %>
|
|
<% elsif vi == true or v == '' -%>
|
|
<%= ki %>
|
|
<% elsif vi.is_a?(Array) -%>
|
|
<% vi.each do |vii| -%>
|
|
<%= ki %> = <%= vii %>
|
|
<% end -%>
|
|
<% elsif ![nil, '', :undef].include?(vi) -%>
|
|
<%= ki %> = <%= vi %>
|
|
<% end -%>
|
|
<% end -%>
|
|
<% end %>
|
|
<% end -%>
|
|
|
|
<% if @includedir and @includedir != '' %>
|
|
!includedir <%= @includedir %>
|
|
<% end %>
|