summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2015-01-25 13:48:52 +0100
committermh <mh@immerda.ch>2015-01-25 13:48:52 +0100
commit0ce33a632f30f8845359e2fc146789013dcd4984 (patch)
tree23de969de029b3063f4700d98b5e88f2d6d22a6d
parente1649647f326abeb256a73e4cb1060840f846f24 (diff)
we only need to ensure grants if the user is present
-rw-r--r--manifests/admin_user.pp8
1 files changed, 5 insertions, 3 deletions
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}"],
+ }
}
}