Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add user and password to correct-debian-grants #57

Merged
merged 2 commits into from
Apr 7, 2015
Merged
Changes from 1 commit
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
17 changes: 9 additions & 8 deletions recipes/galera.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,15 @@

execute 'correct-debian-grants' do
# Add sensitive true when foodcritic #233 fixed
command 'mysql -r -B -N -e "GRANT SELECT, INSERT, UPDATE, DELETE, '\
'CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, '\
'ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, '\
'LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, '\
'CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, '\
"CREATE USER, EVENT, TRIGGER ON *.* TO '" + \
node['mariadb']['debian']['user'] + \
"'@'" + node['mariadb']['debian']['host'] + "' IDENTIFIED BY '" + \
command "mysql -r -B -N -u root "\
"--password='" + node['mariadb']['server_root_password'] + "' -e " \

This comment was marked as outdated.

This comment was marked as outdated.

"\"GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, " \
"SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, " \
"SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION " \
"SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, " \
"ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO " \
"'" + node['mariadb']['debian']['user'] + "'@'" + \
node['mariadb']['debian']['host'] + "' IDENTIFIED BY '" + \
node['mariadb']['debian']['password'] + "' WITH GRANT OPTION\""
action :run
only_if do
Expand Down