Skip to content

Commit f6e8838

Browse files
committed
Add support for REQUIRE SSL|X509 option
1 parent 5e33c91 commit f6e8838

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

lib/puppet/provider/mysql.rb

+2
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ def self.cmd_options(options)
107107
options.each do |opt|
108108
if opt == 'GRANT'
109109
option_string << ' WITH GRANT OPTION'
110+
elsif op = opt.match(/^REQUIRE\s(SSL|X509)$/)
111+
option_string << " #{op[0]}"
110112
end
111113
end
112114
option_string

lib/puppet/provider/mysql_grant/mysql.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ def self.instances
4646
end
4747
end
4848
# Same here, but to remove OPTION leaving just GRANT.
49-
if rest.match(/WITH\sGRANT\sOPTION/)
50-
options = ['GRANT']
51-
else
52-
options = ['NONE']
53-
end
49+
options = []
50+
options << 'GRANT' if rest.match(/WITH\sGRANT\sOPTION/)
51+
req_opt = rest.match(/REQUIRE\s(SSL|X509)/)
52+
options << req_opt[0] if req_opt
53+
options << 'NONE' if options.empty?
5454
# fix double backslash that MySQL prints, so resources match
5555
table.gsub!("\\\\", "\\")
5656
# We need to return an array of instances so capture these

0 commit comments

Comments
 (0)