----- Original Message ----- > From: "jcbollinger" <john.bollin...@stjude.org> > To: puppet-users@googlegroups.com > Sent: Monday, January 14, 2013 3:43:49 PM > Subject: Re: [Puppet Users] Re: Profiles, Hiera, and > create_resources('class','...') > > > > On Monday, January 14, 2013 9:32:52 AM UTC-6, R.I. Pienaar wrote: > > > > > > > > ----- Original Message ----- > > > From: "jcbollinger" > > > To: puppet...@googlegroups.com <javascript:> > > > Sent: Monday, January 14, 2013 3:25:34 PM > > > Subject: [Puppet Users] Re: Profiles, Hiera, and > > create_resources('class','...') > > > > > > > > > > > > On Friday, January 11, 2013 2:14:46 PM UTC-6, Eric Sakowski wrote: > > > > > > > > Hi all, > > > > > > > > We've recently started exploring the role / profile / component module > > > > described by Craig Dunn in his blog here: > > > > http://www.craigdunn.org/2012/05/239/ and discussed on the list the > > other > > > > day. As I was implementing this for > > > > a profile using the apache module, I realized that I could make > > another > > > > refinement to our approach by using > > > > create_resources('class','<module name>') to pull our hiera data into > > the > > > > apache class and override any defaults needed. > > > > It looks good to me but there are some concerns that it will come back > > and > > > > bite us in ways we don't expect > > > > later on, when updating to Puppet 3.0. > > > > > > > > > Good news: it's unlikely that this will bite you later on. > > > Bad news: that's because it will bite you now. > > > > > > Classes are not resources, and the create_resources() function does not > > > work with them. > > > > > > > sure it does - just like any other resources. > > > > class x($msg) { notify{$msg: } } > > > > create_resources("class", {"x" => {"msg" => "hello world"}}) > > > > will produce: > > > > Notice: hello world > > Notice: /Stage[main]/X/Notify[hello world]/message: defined 'message' > > as 'hello world' > > > > > My apologies, then. That did not always work. The issue has come up here, > I think within the past year. Do you know when it changed?
No I am not sure - I dont tend to use create_resources as I consider it about as bad as eval() :) I just know I recently went spelunking into that code while doing some prototype and noticed it worked -- 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.