diff --git a/manifests/db.pp b/manifests/db.pp index 46b1c05..024e7b0 100644 --- a/manifests/db.pp +++ b/manifests/db.pp @@ -55,10 +55,11 @@ define mysql::db ( before => Database_user["${user}@${host}"], } - ensure_resource('database_user', "${user}@${host}", { ensure => $ensure, - password_hash => mysql_password($password), - provider => 'mysql' - }) + $user_resource = { ensure => $ensure, + password_hash => mysql_password($password), + provider => 'mysql' + } + ensure_resource('database_user', "${user}@${host}", $user_resource) if $ensure == 'present' { database_grant { "${user}@${host}/${name}":