What would you recommend as an alternative way to handle these cases? I suppose the mysql lib could be extended to be able to check for users (not easily, but it could be done), but what about in the second case where I want to check for various roles being set as classes and then use those to decide the configuration of foreman. Volcane said that setting variables in the other classes and checking for those isn't going to cut it either. What's a good pattern for this?
On Fri, Jan 20, 2012 at 3:39 AM, Felix Frank < felix.fr...@alumni.tu-berlin.de> wrote: > But this is begging for trouble: > > On 01/19/2012 09:22 PM, Ashley Penney wrote: > > An example: > > > > if ! defined(Mysql_user ["${user}@${host}"]) { > > mysql_user { "${user}@${host}": > > password_hash => mysql_password($password), > > require => File["/root/.my.cnf"], > > } > > } > > If your master processes this before the *other* declaration of that > mysql_user{}, you're back to square one and get errors about multiple > resource declaration. > > I can see only pain down this road. > > Nick's example on the other hand is quite enticing, I think. We want to > keep that (and include it in some Best Practices ;-) > > -- > 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.