I like this one: Myresource <<| Environment == $$::environment |>> # ye old capitalization like other parts of puppet
It's easy to read and makes me think "a think that's defined somewhere else". Trevor On Mon, Apr 7, 2014 at 11:04 AM, Ken Barber <[email protected]> wrote: > Hmm. Lots of things are possible, just need to avoid collision with > the parameter naming. > > Myresource <<| .environment == $$::environment |>> # > dalen's suggestion > Myresource <<| _environment == $$::environment |>> # > alternate to dalen's suggestion > Myresource <<| catalog.environment == $$::environment |>> # implies > that 'catalog' is an object with subparameters > Myresource <<| Environment == $$::environment |>> # ye old > capitalization like other parts of puppet > Myresource <<| same_environment? |>> # > short-hand for matching the same environment > > ken. > > On Wed, Apr 2, 2014 at 4:14 PM, Erik Dalén <[email protected]> > wrote: > > > > On 2 April 2014 16:40, Ken Barber <[email protected]> wrote: > >> > >> > I quite like the idea of allowing people to restrict collection based > >> > on environment. That requires a slight tweak to the puppetdb terminus > >> > code, but I don't think it'll be too bad. Erik is correct, though, > >> > that we can't really use "environment" as the search term there > >> > because there are some resources that use "environment" as a parameter > >> > name (like "exec"). :/ > >> > >> Does anyone have any suggestions for avoiding this conflict? > >> > > > > As I mentioned, in puppetdbquery I've been thinking about using > properties > > prefixed with a dot, so .environment for this and just environment for > the > > exec parameter. Not sure how well this would work in Puppet itself > though, > > but maybe something similar could be done. > > > > But It would be good if both query methods used the same notation to make > > things simple. So I'm up for ideas regarding puppetdbquery as well. > > > > -- > > 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/CAAAzDLcK7C8czPd0u3t7tAXQvKGOOdByrWQhQ44XA7g30dHQew%40mail.gmail.com > . > > > > For more options, visit https://groups.google.com/d/optout. > > -- > 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/CAE4bNTkJy7JdXXvY3J9nmm-sLubk0xuj6c0i6XD30hq%3DqmFU8g%40mail.gmail.com > . > For more options, visit https://groups.google.com/d/optout. > -- Trevor Vaughan Vice President, Onyx Point, Inc (410) 541-6699 [email protected] -- This account not approved for unencrypted proprietary information -- -- 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/CANs%2BFoUtfudw5rgn1J-dOPQrXFQ5hYpuZpjwQG365qemFz6b6g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
