Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

handle mysql compiled without ssl

mysql doesn't allow ssl=true/false in my.cnf if it hasn't been compiled
with ssl, therefor add a new parameter ssl-disable which makes sure the
template doesn't write anything with ssl to the config.
  • Loading branch information...
commit abcea00dcbb5db62a044de0c47f0c8129c1e75dd 1 parent 7884ff7
@globin globin authored
Showing with 4 additions and 1 deletion.
  1. +1 −0  manifests/params.pp
  2. +3 −1 templates/my.cnf.erb
View
1  manifests/params.pp
@@ -212,6 +212,7 @@
'ssl-ca' => $mysql::params::ssl_ca,
'ssl-cert' => $mysql::params::ssl_cert,
'ssl-key' => $mysql::params::ssl_key,
+ 'ssl-disable' => false,
'thread_cache_size' => '8',
'thread_stack' => '256K',
'tmpdir' => $mysql::params::tmpdir,
View
4 templates/my.cnf.erb
@@ -2,7 +2,9 @@
<% if v.is_a?(Hash) -%>
[<%= k %>]
<% v.sort.map do |ki, vi| -%>
-<% if vi == true or v == '' -%>
+<% if ki =~ /^ssl/ and v['ssl-disable'] == true -%>
+<% next %>
+<% elsif vi == true or v == '' -%>
<%= ki %>
<% elsif vi.is_a?(Array) -%>
<% vi.each do |vii| -%>
Please sign in to comment.
Something went wrong with that request. Please try again.