summaryrefslogtreecommitdiffstats
path: root/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp7
1 files changed, 6 insertions, 1 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index d202785..e4386b0 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -171,10 +171,15 @@ define mysql::datasource($rootpw, $ds_name, $ds_owner, $ds_owner_pwd, $ds_user,
exec { "create grants $ds_name":
command => "$mysql_root_cmd -e \"GRANT ALL PRIVILEGES ON *.* TO '$ds_owner'@'%' IDENTIFIED BY '$ds_owner_pwd' WITH GRANT OPTION;\"",
- unless => "/usr/bin/mysql --host $ipaddress --user=$ds_owner -password=$ds_password -e '\s'",
+ unless => "/usr/bin/mysql --host $ipaddress --user=$ds_owner -password=$ds_owner_pwd -e '\s'",
require => [Service["mysql"], Exec["mysql root password init"]],
}
+ exec { "create grants $ds_owner":
+ command => "$mysql_root_cmd -e \"GRANT SELECT,INSERT,UPDATE,DELETE ON $ds_name.* TO '$ds_user'@'%' IDENTIFIED BY '$ds_user_pwd';\"",
+ unless => "/usr/bin/mysql --host $ipaddress --user=$ds_user -password=$ds_user_pwd -e '\s'",
+ require => [Service["mysql"], Exec["mysql root password init"]],
+ }
# Only create the schema is a template directory was specified
if $ds_schema {
exec { "create db $ds_name":