Re: [Puppet Users] Puppetdb query. Search two classes

2014-08-11 Thread Ken Barber
>> Thanks, but I says about query like this: >> >> ["and", >> ["and", >> ["=", "type", "Class"], >> ["=", "title", "Php"]], >> ["and", >> ["=", "type", "Class"], >> ["=", "title", "Nginx"]]] > > Think about what this does behind the scenes on the resources endpoint > (see the qu

Re: [Puppet Users] Puppetdb query. Search two classes

2014-08-08 Thread Ken Barber
> Thanks, but I says about query like this: > > ["and", > ["and", > ["=", "type", "Class"], > ["=", "title", "Php"]], > ["and", > ["=", "type", "Class"], > ["=", "title", "Nginx"]]] Think about what this does behind the scenes on the resources endpoint (see the query here: http

Re: [Puppet Users] Puppetdb query. Search two classes

2014-08-08 Thread Maksim Podlesniy
Thanks, but I says about query like this: ["*and*", ["and", ["=", "type", "Class"], ["=", "title", "Php"]], ["and", ["=", "type", "Class"], ["=", "title", "Nginx"]]] Unfortunately, this query doesn't work. I use generate function and my own python script for puppetdb query.

Re: [Puppet Users] Puppetdb query. Search two classes

2014-08-07 Thread José Luis Ledesma
If you have puppetdb you can query it through curl or puppetdbquery https://docs.puppetlabs.com/puppetdb/latest/api/query/tutorial.html https://github.com/dalen/puppet-puppetdbquery El 07/08/2014 14:45, "Maksim Podlesniy" escribió: > How I may find all nodes with two specified classes? Example

Re: [Puppet Users] Puppetdb query. Search two classes

2014-08-07 Thread Ken Barber
I might be thinking about this the wrong way, but I think the API can only do so much on the server side to achieve this. In particular I want to do a distinct aggregation but we don't support that. Fortunately, this is achievable on the command line with a tool like JGrep: http://jgrep.org/#howto

[Puppet Users] Puppetdb query. Search two classes

2014-08-07 Thread Maksim Podlesniy
How I may find all nodes with two specified classes? Example: find all nodes with class Nginx and Php Sorry for my bad english. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, s