module-puppetlabs-mysql/templates/my.cnf.erb
Julien Pivotto e30e0bc958 Re-Add the ability to set a empty string as option parameter
Prior to 136b1aa646 it was possible to
have an empty string as value of a my.cnf parameter, resulting in a line
with just the parameter name.

That commit re-enable that behavior that was removed by accident.
2016-01-08 14:00:31 +01:00

24 lines
633 B
Text

### MANAGED BY PUPPET ###
<% @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 vi == '' -%>
<%= 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 %>