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
6 changes: 3 additions & 3 deletions templates/grant.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# File managed by Puppet

<% if mysql_db != "*" then %>
CREATE DATABASE IF NOT EXISTS `<%= mysql_db %>` ;
<% if @mysql_db != "*" then %>
CREATE DATABASE IF NOT EXISTS `<%= @mysql_db %>` ;
<% end %>
GRANT <%= mysql_privileges %> ON `<%= mysql_db %>`.* TO '<%= mysql_user %>'@'<%= mysql_host %>' IDENTIFIED BY '<%= mysql_password %>';
GRANT <%= @mysql_privileges %> ON `<%= @mysql_db %>`.* TO '<%= @mysql_user %>'@'<%= @mysql_host %>' IDENTIFIED BY '<%= @mysql_password %>';
FLUSH PRIVILEGES ;

4 changes: 2 additions & 2 deletions templates/query.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# File managed by Puppet

<% if @mysql_db -%>
USE <%= mysql_db -%> ;
USE <%= @mysql_db -%> ;
<% end -%>
<%= mysql_query %> ;
<%= @mysql_query %> ;

4 changes: 2 additions & 2 deletions templates/spec.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
<%= scope.to_hash.reject { |k,v| !( k.is_a?(String) && v.is_a?(String) ) }.to_yaml %>

# Custom Options
<%= options['opt_a'] %>
<%= options['opt_b'] %>
<%= @options['opt_a'] %>
<%= @options['opt_b'] %>
8 changes: 4 additions & 4 deletions templates/user.erb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# File managed by Puppet

GRANT USAGE ON *.*
TO '<%= mysql_user %>'@'<%= mysql_host %>'
TO '<%= @mysql_user %>'@'<%= @mysql_host %>'
IDENTIFIED BY
<% if has_variable?('mysql_password_hash') && mysql_password_hash then %>
PASSWORD '<%= mysql_password_hash %>'
<% if has_variable?('mysql_password_hash') && @mysql_password_hash then %>
PASSWORD '<%= @mysql_password_hash %>'
<% else %>
'<%= mysql_password %>';
'<%= @mysql_password %>';
<% end %>
;
FLUSH PRIVILEGES;