we only need to ensure grants if the user is present

This commit is contained in:
mh 2015-01-25 13:48:52 +01:00
parent e1649647f3
commit 0ce33a632f

View file

@ -14,8 +14,10 @@ define mysql::admin_user(
password_hash => $password_hash, password_hash => $password_hash,
require => Exec['mysql_set_rootpw'], require => Exec['mysql_set_rootpw'],
} }
mysql_grant{"${name}@${host}": if $ensure == 'present' {
privileges => 'all', mysql_grant{"${name}@${host}":
require => Mysql_user["${name}@${host}"], privileges => 'all',
require => Mysql_user["${name}@${host}"],
}
} }
} }