On 1 April 2014 03:43, Ken Barber <[email protected]> wrote: > >> Upon reflection, I think it would be wise to control which resources are > >> collected strictly via search expressions. I disfavor a configuration > >> setting affecting that, because if there were one then it would be > likely > >> that different modules would be developed with different assumptions > about > >> the configured behavior. Or to put it a different way, people should > not > >> need to refer to Puppet's configuration to determine what any given > snippet > >> of DSL code means. > > > > I guess the problem such a solution leaves is, that people who really > > do want global collection have to litter their code with explicit > > environment == '*' clauses. How many people will get affected by this > > would be interesting, seems at least 2 people on the response so far. > > Any ideas for that? > > That said, I shouldn't speak for others. For those who do currently > use global resource collection, how would such a solution affect you? > And any other thoughts you can think of ... > > This seems a bit backwards to me, for all other parts of the query you just leave it out if you don't want to match on it. There's no need for a explicit tags=='*' if you want to match on all tags for example. So I don't see why environment matching would work the opposite way.
So I'm proposing instead that you add environment==$::environment to your query if you want to collect only from your current environment. -- Erik Dalén -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/CAAAzDLdEu84Vd9z8yLD-8J%3D01TZgOH0CHg4zW%2BGU%2B9106Lyb0g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
