Hi there,
I thought I understood how this module works, but I guess I missed
something. Here is what I have in my nodes.pp
node ''mysql'' inherits default {
include mysql
mysql::user { "db1":
mysql_password_hash => "db1",
mysql_user => "db1",
mysql_host => "%"
}
mysql::grant { "db1":
mysql_privileges => "ALL",
mysql_password => "password",
mysql_db => "db1",
mysql_user => "db1",
mysql_host => "%"
}
}
That works perfectly. What I want to do is expand this to be able to
setup additional users and grants. I thought adding more lines for
mysql::user & mysql::grant to do more users.
Any suggestions how I do this? I''m at a bit of a loss how to handle
multiple users and grants.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
Hi, On 02/10/2012 03:09 AM, Will S. G. wrote:> Hi there, > > I thought I understood how this module works, but I guess I missed > something. Here is what I have in my nodes.pp > > > node ''mysql'' inherits default { > include mysql > mysql::user { "db1": > mysql_password_hash => "db1", > mysql_user => "db1", > mysql_host => "%" > } > mysql::grant { "db1": > mysql_privileges => "ALL", > mysql_password => "password", > mysql_db => "db1", > mysql_user => "db1", > mysql_host => "%" > } > } > > That works perfectly. What I want to do is expand this to be able to > setup additional users and grants. I thought adding more lines for > mysql::user & mysql::grant to do more users. > > Any suggestions how I do this? I''m at a bit of a loss how to handle > multiple users and grants.can you rephrase your question to make it more specific? Obviously copy''n''paste will work to duplicate your efforts to new areas. There are good reasons not to do this, but I''m curious what exactly you need to do that makes you ask for better ways. Cheers, Felix -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
mysql::grant { ["db1", "db2"]: mysql_privileges =>
"ALL", mysql_password =>
"password", mysql_db => "db1", mysql_user =>
["db1", "db2"], mysql_host =>
"%" } }
Keep in mind this sets both users with same pw for both dbs. It would be
better to just copy n paste another grant directive and chg according to
another user.
On Feb 9, 2012 8:09 PM, "Will S. G." <will@arw.in> wrote:
> Hi there,
>
> I thought I understood how this module works, but I guess I missed
> something. Here is what I have in my nodes.pp
>
>
> node ''mysql'' inherits default {
> include mysql
> mysql::user { "db1":
> mysql_password_hash => "db1",
> mysql_user => "db1",
> mysql_host => "%"
> }
> mysql::grant { "db1":
> mysql_privileges => "ALL",
> mysql_password => "password",
> mysql_db => "db1",
> mysql_user => "db1",
> mysql_host => "%"
> }
> }
>
> That works perfectly. What I want to do is expand this to be able to
> setup additional users and grants. I thought adding more lines for
> mysql::user & mysql::grant to do more users.
>
> Any suggestions how I do this? I''m at a bit of a loss how to
handle
> multiple users and grants.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.