Skip to content

Allow wildcard host assignment with sql. #68

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

Merged
merged 1 commit into from
May 4, 2012
Merged
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
8 changes: 6 additions & 2 deletions manifests/db.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Define: mysql::db
#
# This module creates database instances, a user, and grants that user
# privileges to the database.
# privileges to the database. It can also import SQL from a file in order to,
# for example, initialize a database schema.
#
# Since it requires class mysql::server, we assume to run all commands as the
# root mysql user against the local mysql server.
#
# Parameters:
# [*title*] - mysql database name.
Expand Down Expand Up @@ -62,7 +66,7 @@

if $sql {
exec{ "${name}-import":
command => "/usr/bin/mysql -u ${user} -p${password} -h ${host} ${name} < ${sql}",
command => "/usr/bin/mysql ${name} < ${sql}",
logoutput => true,
refreshonly => $refresh,
require => Database_grant["${user}@${host}/${name}"],
Expand Down