Hey Mike, I'm thinking you want something like this: curl -X GET http://localhost:8080/pdb/query/v4/nodes -d 'query=["and", ["=", ["fact", "operatingsystemmajrelease"], 7], ["=", ["fact", "facta"], true]]'
Wyatt On Fri, Jun 3, 2016 at 6:40 AM, Mike Sharpton <[email protected]> wrote: > Hey all, > > I am trying to do what should be a simple thing. I need to query PuppetDB > to gather a list of machines based on arbitrary facta being equal to true > and the operatingsystemmajrelease fact being 7. I have searched around and > found a few examples, but can't get them to work properly. I saw and > example from Wyatt on here, but I must be doing something wrong as I can't > even get that to run. I have PuppetDB 3.2.0. > > I'm not sure if I should be running my query against this endpoint > /pdb/query/v4/facts/, or drill into the facta uri and run a in/and against > the operatingsystemmajrelease fact to get what I need. All I need back is > the certname of the machines in which facta is true and > operatingsystemmajrelease is 7. If someone has a quick one liner, it would > be appreciated, otherwise I can bust out the data and filter it with > Excel. Thanks, > > Mike > > -- > 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, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/5a1fec0e-1d02-442f-9465-9660a6087a8f%40googlegroups.com > <https://groups.google.com/d/msgid/puppet-users/5a1fec0e-1d02-442f-9465-9660a6087a8f%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAJDiH3HK%3DihNjuz8PGWcKM_XsQsHcQ46DCqBw-o8etY8uG-JpQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
