From 0ce33a632f30f8845359e2fc146789013dcd4984 Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 25 Jan 2015 13:48:52 +0100 Subject: we only need to ensure grants if the user is present --- manifests/admin_user.pp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'manifests') diff --git a/manifests/admin_user.pp b/manifests/admin_user.pp index 66e0cc1..78085bc 100644 --- a/manifests/admin_user.pp +++ b/manifests/admin_user.pp @@ -14,8 +14,10 @@ define mysql::admin_user( password_hash => $password_hash, require => Exec['mysql_set_rootpw'], } - mysql_grant{"${name}@${host}": - privileges => 'all', - require => Mysql_user["${name}@${host}"], + if $ensure == 'present' { + mysql_grant{"${name}@${host}": + privileges => 'all', + require => Mysql_user["${name}@${host}"], + } } } -- cgit v1.2.3