You can use the database_grant resource type. Here is an example:

  database_grant { "${user}@${::hostname}/${db}":
    privileges => ['select'], # anything you want
    require    => Database_user["${user}@${::hostname}"],
  }

set the $user and $db variables to what you want ;)

More information can be found on the github README file for module.


-- 
Nikola


On Tue, Mar 05, 2013 at 09:21:28AM +0100, Arnau Bria wrote:
> Hi all,
> 
> I'm using the MySQL module
> https://forge.puppetlabs.com/puppetlabs/mysql and I can't find the way
> to give certain permission to a secondary user over an already created
> DB (which has it own user):
> 
> 
>         mysql::db { 'galaxy':
>                 user     => 'galaxy',
>                 password => 'XXXXXX',
>                 host     => 'localhost',
>                 grant    => ['all'],
>         }
> 
> Now I would like to give select privileges on galaxy DB to user arnau,
> but I can't find the way for doing so.
> 
> Could someone give a hand?
> 
> TIA,
> Arnau
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to