puppetlabs/puppetlabs-mysql — pull request #590 by jbrunner (2014-10-31 15:17:23+00:00)
Title: make user and table parameter of mysql_grant() optional

Because name must match user and table parameters,
extract user and table defaults from name.

Struggled on this while trying to grant several users once using ensure_resource.

This will now work:

$user_grant = {
privileges => [ ... ],
provider => 'mysql',
}
$users = [ 'me@localhost/table.*', 'me@10.10.%/table.*' ]
ensure_resource('mysql_grant', $users, $user_grant)