From 61375314df8929d7c89d102b8f2f228db605b8b8 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 20 Jun 2010 12:17:49 -0300 Subject: Just granting if db/user is present at database::instance --- manifests/subsystems/database.pp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'manifests/subsystems') diff --git a/manifests/subsystems/database.pp b/manifests/subsystems/database.pp index 99c43f9..b896c01 100644 --- a/manifests/subsystems/database.pp +++ b/manifests/subsystems/database.pp @@ -13,9 +13,11 @@ class database { require => Mysql_database["$name"], } - mysql_grant { "$name@%/$name": - privileges => all, - require => Mysql_user["$name@%"], + if $ensure == 'present' { + mysql_grant { "$name@%/$name": + privileges => all, + require => Mysql_user["$name@%"], + } } } } -- cgit v1.2.3