From 480609108e9151c847120d4f60bcf7ec4b351048 Mon Sep 17 00:00:00 2001 From: Dan Schaefer Date: Wed, 14 Aug 2013 10:48:27 -0400 Subject: [PATCH] Adding mysql_db_init_query_file in mysql::grant --- manifests/grant.pp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/manifests/grant.pp b/manifests/grant.pp index 5570de6..608eabb 100644 --- a/manifests/grant.pp +++ b/manifests/grant.pp @@ -26,7 +26,8 @@ $mysql_create_db = true, $mysql_privileges = 'ALL', $mysql_host = 'localhost', - $mysql_grant_filepath = '/root/puppet-mysql' + $mysql_grant_filepath = '/root/puppet-mysql', + $mysql_db_init_query_file = '' ) { require mysql @@ -95,4 +96,13 @@ refreshonly => true; } + if $mysql_db_init_query_file != '' { + mysql::queryfile { "mysql_db_init_query_file-${mysql_host}-${dbname}": + mysql_file => $mysql_db_init_query_file, + mysql_user => $mysql_user, + mysql_password => $mysql_password, + mysql_db => $mysql_db, + mysql_host => $mysql_host, + } + } }