Skip to content
This repository was archived by the owner on Jun 11, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion manifests/grant.pp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
# Default: ''
# $remote_password - Password to use when running the command on a remote server.
# Default: ''
# $require_ssl - Define if SSL connection is required for the user.
# Default: false
define mysql::grant (
$mysql_user,
$mysql_password,
Expand All @@ -41,7 +43,8 @@
$mysql_db_init_query_file = '',
$remote_host = '',
$remote_user = '',
$remote_password = ''
$remote_password = '',
$require_ssl = false,
) {

require mysql
Expand Down
2 changes: 1 addition & 1 deletion templates/grant.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<% if @bool_mysql_create_db -%>
CREATE DATABASE IF NOT EXISTS <%= @real_db %><%= @real_db_create_options %>;
<% end -%>
GRANT <%= @mysql_privileges %> ON <%= @real_db %>.* TO '<%= @mysql_user %>'@'<%= @mysql_host %>' IDENTIFIED BY '<%= @mysql_password %>';
GRANT <%= @mysql_privileges %> ON <%= @real_db %>.* TO '<%= @mysql_user %>'@'<%= @mysql_host %>' IDENTIFIED BY '<%= @mysql_password %>'<% if @require_ssl -%> require ssl<% end -%>;
FLUSH PRIVILEGES ;