On Sun, Feb 13, 2011 at 7:21 PM, Nigel Kersten <ni...@puppetlabs.com> wrote:
> > > On Sat, Feb 12, 2011 at 7:40 PM, Dan Bode <d...@puppetlabs.com> wrote: > >> >>> Could we add the ability to query whether a given resource has >>>> been realized or not? How much of an ordering problem is this? >>>> Package <| state == virtual |> >>>> Package <| state == real |> >>>> >>> >> Sounds reasonable, I have actually tried something like this before hoping >> it would work. (the use case was that I wanted to specify some dependency >> for all resources of a given type that I was realizing) >> > > I'm curious how many people are actually using this syntax for resource > realization rather than the realize() function? > > Generally when I realize resources, I'm doing so for very specific > resources, not large collections of resources. > > Should we be conflating querying/collecting and realizing like this at > all? > > We have only been teaching <| |> in the puppetmaster training as a way to realize virtual resources. We do not teach that it is possible to override attributes with this syntax as well: <| |> {} (at least in part b/c the implications/non-determinism terrify me) , and do not teach that it actually effects all resources. The common example from class is something like: class db::users { user { ['alice', 'bob']: ensure => present, gid => 'dbadmin', } } class app::users { user { ['charlie', 'bob']: ensure => present, gid => 'webadmin', } } class app { User<| gid == 'webadmin' |> ... } class db { User<| gid == 'dbadmin' |> ... } so that a machine can safely be a webserver and db server without conflict. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@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 Developers" group. To post to this group, send email to puppet-dev@googlegroups.com. To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.